Skip to content

Commit

Permalink
Dont output empty reads - fix nullsize str error
Browse files Browse the repository at this point in the history
  • Loading branch information
florianzwagemaker committed Feb 23, 2021
1 parent d8192a9 commit d986c1f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/scripts/RemoveONTPrimers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from io import StringIO
import argparse
import os
import numpy as np

##* import van modin is later (na argparse sectie) zodat het aantal bruikbare threads ingesteld kan worden

Expand Down Expand Up @@ -364,7 +365,10 @@ def Cut_FastQ(input, reference, ForwardList, ReverseList, AllList):
)
for hit2 in Aln.map(readseq):
readend = hit2.r_en


if len(readseq) == 0:
return np.nan

return readseq, readqual


Expand All @@ -384,6 +388,8 @@ def Cut_FastQ(input, reference, ForwardList, ReverseList, AllList):
Cut_FastQ, args=(reference, ForwardList, ReverseList, AllList), axis=1
)

ReadFrame.dropna(subset=['ProcessedReads'], inplace=True)

ReadFrame[["ProcessedSeq", "ProcessedQual"]] = pd.DataFrame(
ReadFrame["ProcessedReads"].tolist(), index=ReadFrame.index
)
Expand Down

0 comments on commit d986c1f

Please sign in to comment.