Skip to content

Commit

Permalink
added virsorter2 nan fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mult1fractal committed Aug 16, 2022
1 parent 1fa19d4 commit 59e6021
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions workflows/process/virsorter2/filter_virsorter2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ process filter_virsorter2 {
script:
"""
tail -n+2 *.tsv | awk '{ print \$1, \$2 }' OFS='\\t' | awk '{ print \$1, \$2 }' OFS='||' | cut -d "|" -f1,5 | awk -F"|" '{ print \$1, \$2 }' OFS='\t' > virsorter2_\${PWD##*/}.tsv
sed -i 's/nan/0/g' virsorter2_\${PWD##*/}.tsv
"""
}

Expand All @@ -19,3 +20,17 @@ ctg6_len=5303||full 0.967 0.733 0.967 dsDNAphage 3585 1

//awk '{ gsub(/||full/,"", $3); print }' OFS='\t' tmp_result.tsv > tmp_results2.tsv
//awk '{ print \$1, \$2 }' OFS='||' virsorter2_\${PWD##*/}.tsv

// nan if row contains nan make to 0
// GT1_27252 0.840 virsorter2
// GT1_27276 0.640 virsorter2
// GT1_27283 0.560 virsorter2
// GT1_27330 0.633 virsorter2
// GT1_27380 0.180 virsorter2
// GT1_1 0.840 virsorter2
// GT1_396 0.567 virsorter2
// GT1_2577 nan virsorter2
// GT1_5431 nan virsorter2
// GT1_5765 nan virsorter2
// GT1_7346 nan virsorter2
//sed -i 's/nan/0/g' virsorter2_test_nan.txt

0 comments on commit 59e6021

Please sign in to comment.