Skip to content

Commit

Permalink
properly deal with [None] returned by parkour (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
WardDeb authored Dec 12, 2024
2 parents 6cbbe80 + 9a7cbd4 commit 79c0b6a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dissectBCL/fakeNews.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,11 @@ def gatherFinalMetrics(outLane, flowcell):
# samples with 0 reads still make an empty report.
# hence the try / except.
# 'mouse (GRCm39)' -> 'mouse'
parkourOrg = str( # To string since NA is a float
ssdf[ssdf["Sample_ID"] == sampleID]['Organism'].values[0][0]
).split(' ')[0]
# Since the ['organism', 'substr', 'yamlstr'], 'nonetypes' are [None]
try:
parkourOrg = ssdf[ssdf["Sample_ID"] == sampleID]['Organism'].values[0][0]
except TypeError:
parkourOrg = "NA"
try:
screenDF = pd.read_csv(
screen, sep='\t', header=None
Expand Down

0 comments on commit 79c0b6a

Please sign in to comment.