Skip to content

Commit

Permalink
Merge pull request #60 from campanam/v0.5.11-development
Browse files Browse the repository at this point in the history
V0.5.11 development
  • Loading branch information
campanam authored Jan 19, 2023
2 parents 107f546 + 0558933 commit 986a60e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.Md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ First version integrated into pipeline
Initial script (plotDPGQ-clean.R)

## ratestools
### Version 0.5.11
Fixed glitch in summarizeDNM when no candidate sites found

### Version 0.5.10
Update file headers
Contig length filtration
Expand Down
12 changes: 9 additions & 3 deletions ratestools.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env nextflow

/* RatesTools version 0.5.10
/* RatesTools version 0.5.11
Michael G. Campana and Ellie E. Armstrong, 2020-2023
Smithsonian Institution and Stanford University
Expand Down Expand Up @@ -916,6 +916,7 @@ process summarizeDNM {
path "${params.prefix}*_candidates.vcf.gz" into candidates_vcf_ch

"""
#!/usr/bin/env bash
for file in ${params.prefix}*.log; do
if [ ! -d \${file%_chr*.log} ]; then
mkdir \${file%_chr*.log}
Expand All @@ -932,8 +933,13 @@ process summarizeDNM {
val=`grep -n \'#CHROM\' \$sumlog | cut -d \':\' -f 1`
total=`wc -l \$sumlog | cut -d \' \' -f 1`
let lncount=\$total-\$val
tail -n \$lncount \$sumlog > tmp.txt
cat header.txt tmp.txt | gzip > \${sumlog/_summary.log/_candidates.vcf.gz}
if [ \$lncount -gt 0 ]; then
tail -n \$lncount \$sumlog > tmp.txt
cat header.txt tmp.txt | gzip > \${sumlog/_summary.log/_candidates.vcf.gz}
else
mv header.txt \${sumlog/_summary.log/_candidates.vcf}
gzip \${sumlog/_summary.log/_candidates.vcf}
fi
done
"""

Expand Down

0 comments on commit 986a60e

Please sign in to comment.