Skip to content

Commit

Permalink
adding n reads to polyx
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljon committed May 24, 2022
1 parent deb97b8 commit 462e3e3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Modules/PolyX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public class PolyX : IQcModule

private readonly ulong[] polyG = new ulong[2];

private readonly ulong[] polyN = new ulong[2];

private ulong sequenceCount;

private ulong tooShort;
Expand All @@ -31,8 +33,8 @@ public object Data
sequenceCount,
tooShort,
target = POLY_SIZE,
head = new { a = polyA[0], t = polyT[0], c = polyC[0], g = polyG[0] },
tail = new { a = polyA[1], t = polyT[1], c = polyC[1], g = polyG[1] },
head = new { a = polyA[0], t = polyT[0], c = polyC[0], g = polyG[0], n = polyN[0] },
tail = new { a = polyA[1], t = polyT[1], c = polyC[1], g = polyG[1], n = polyN[1] },
};
}
}
Expand All @@ -58,6 +60,9 @@ public void ProcessSequence(Sequence sequence)

if (CheckPolyHead((byte)'G', sequence.Read) == true) polyG[0]++;
if (CheckPolyTail((byte)'G', sequence.Read) == true) polyG[1]++;

if (CheckPolyHead((byte)'N', sequence.Read) == true) polyN[0]++;
if (CheckPolyTail((byte)'N', sequence.Read) == true) polyN[1]++;
}

public void Reset()
Expand All @@ -66,6 +71,7 @@ public void Reset()
polyT[0] = 0; polyT[1] = 0;
polyC[0] = 0; polyC[1] = 0;
polyG[0] = 0; polyG[1] = 0;
polyN[0] = 0; polyN[1] = 0;

sequenceCount = 0;
tooShort = 0;
Expand Down

0 comments on commit 462e3e3

Please sign in to comment.