Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove space in genome header and special nt in hairpin for mirdeep2 … #79

Merged
merged 9 commits into from
May 10, 2021
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## v1.1dev - [date]

* remove spaces in genome headers and replace special nt by N in hairpin file for mirdeep2 to work. [[#69]] (https://github.com/nf-core/smrnaseq/pull/79)
* Accept custom genome and remove non-canonical letters in the genome. Thanks to @sdjebali. Follow up from [[#63]](https://github.com/nf-core/smrnaseq/pull/63)
* Fix error when only one sample is in the input [[#31]](https://github.com/nf-core/smrnaseq/issues/31)
* Change `--reads` to `--input` for consistency with rest of nf-core
Expand Down
9 changes: 5 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -797,15 +797,16 @@ process mirdeep2 {

script:
"""
perl -ane 's/y/N/ig;print;' $hairpin > hairpin_yn.fa

perl -ane 's/[ybkmrsw]/N/ig;print;' $hairpin > hairpin_ok.fa
sed 's/ .*//' $refgenome | awk '\$1 ~ /^>/ {gsub(/_/,"",\$1); print; next} {print}' > genome_nowhitespace.fa

miRDeep2.pl \\
$reads_collapsed \\
$refgenome \\
genome_nowhitespace.fa \\
$reads_vs_refdb \\
$mature \\
none \\
hairpin_yn.fa \\
hairpin_ok.fa \\
-d \\
-z _${reads_collapsed.simpleName}
"""
Expand Down