Skip to content

Commit

Permalink
fix!: DNA and RNA join correction
Browse files Browse the repository at this point in the history
  • Loading branch information
visze committed Mar 30, 2022
1 parent f949aa0 commit 7214743
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions workflow/rules/counts.smk
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,18 @@ rule dna_rna_merge_counts:
shell:
"""
zero={params.zero};
if [[ $zero=false ]]
if [[ -z "${{zero//false}}" ]]
then
echo "Using no zeros";
join -1 1 -2 1 -t"$(echo -e '\\t')" \
<( zcat {input.dna} | sort ) \
<( zcat {input.rna} | sort) | \
gzip -c > {output}
gzip -c > {output};
else
echo "Allowing zeros!"
join -e 0 -a1 -a2 -t"$(echo -e '\\t')" -o 0 1.2 2.2 \
<( zcat {input.dna} | sort ) \
<( zcat {input.rna} | sort) | \
gzip -c > {output}
fi
fi > {log}
"""

0 comments on commit 7214743

Please sign in to comment.