Skip to content

Commit

Permalink
solve parsing issue - it was a BUG!!!! 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
cimendes committed Oct 21, 2024
1 parent e4022ca commit 2629708
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/taxon_id/contamination/task_kraken2.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ task kraken2_parse_classified {
if [ ! -z "~{target_organism}" ]; then
echo "Target org designated: ~{target_organism}"
if [[ "~{target_organism}" == "Severe acute respiratory syndrome coronavirus 2" ]]; then
percentage_sc2=$(grep "Severe acute respiratory syndrome coronavirus 2" ~{samplename}.report.txt | cut -f1 )
percentage_sc2=$(grep "Severe acute respiratory syndrome coronavirus 2" ~{kraken2_report} | cut -f1 )
percent_target_organism=""
if [ -z "$percentage_sc2" ] ; then percentage_sc2="0" ; fi
else
percentage_sc2=""
percent_target_organism=$(grep "~{target_organism}" ~{samplename}.report.txt | cut -f1 | head -n1 )
percent_target_organism=$(grep "~{target_organism}" ~{kraken2_report} | cut -f1 | head -n1 )
if [ -z "$percent_target_organism" ] ; then percent_target_organism="0" ; fi
fi
else
Expand Down

0 comments on commit 2629708

Please sign in to comment.