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

Update 20241203 #391

Merged
merged 73 commits into from
Dec 9, 2024
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5136eb8
moved files to local and updated
erinyoung Dec 4, 2024
c3fb162
renamed files
erinyoung Dec 4, 2024
f3dca10
renamed directory
erinyoung Dec 4, 2024
9e00f01
adjusted for compatibility
erinyoung Dec 4, 2024
4e2d31b
removed most test
erinyoung Dec 4, 2024
a5277fe
separated workflow to new file
erinyoung Dec 4, 2024
303f151
added modules
Dec 5, 2024
701b9f1
added nextclade_dataset
Dec 5, 2024
d88b64f
added aci options
Dec 5, 2024
f51b97a
renamed ARTIC_FILTERING to ARTIC_FILTER
Dec 5, 2024
9d863b9
used meta
Dec 5, 2024
c5132ec
fixed ppath
Dec 5, 2024
54d48c0
used meta
Dec 5, 2024
7746906
used meta
Dec 5, 2024
6655b5c
used meta
Dec 5, 2024
5e743a7
testing genome download and msa
Dec 5, 2024
c4e6017
added
Dec 5, 2024
30faaf8
adds latest
Dec 5, 2024
f837290
for donwloading genomes
Dec 5, 2024
d10a4ca
fixed typo
Dec 5, 2024
3c04df2
renamed files
Dec 5, 2024
f7ba7e8
used meta
Dec 5, 2024
85175c9
changed from cecret to CONSENSUS
Dec 5, 2024
f1e4363
script filename
Dec 5, 2024
1e2ccb6
script filename
Dec 5, 2024
b849148
removed extra return
Dec 5, 2024
b90f578
added script name
Dec 5, 2024
085c715
renamed to NEXTCLADE DATASET
Dec 5, 2024
e9161ae
added params to config file
Dec 5, 2024
1fb6085
nf-core tools fixes
Dec 5, 2024
4fe75ce
added maxcpus and medcpus warning
Dec 5, 2024
d006294
fixed lowercase typos
Dec 5, 2024
363eb13
changed process names
Dec 5, 2024
b63b57f
changed process names
Dec 5, 2024
1f803dc
added meta for downloaded fastq files
Dec 5, 2024
37d0ea9
named shell to script
Dec 5, 2024
38be64d
added
Dec 5, 2024
f6a09ca
spacing changes
Dec 5, 2024
c1d986e
pango aliasor
Dec 5, 2024
84694f6
added channel
Dec 5, 2024
bc6ecb6
changed name
Dec 5, 2024
c32893b
removed unused lines
Dec 5, 2024
84a0ac3
added
Dec 5, 2024
5ed1fc5
added
Dec 5, 2024
e09d68d
fixed space
Dec 5, 2024
76dfada
added defaults and linted
Dec 5, 2024
e79c681
passed linting
Dec 5, 2024
a0480a0
added options
Dec 5, 2024
22308a5
adjusted quotations
Dec 5, 2024
c7b2a49
remove config file
Dec 5, 2024
b5b37ad
changed collapse to aliasor
Dec 5, 2024
04f4bd4
removed params.config_file
Dec 5, 2024
5c3e115
tied pango aliasor to pangolin
Dec 5, 2024
6745531
removed maxcpus
Dec 6, 2024
fe037a4
fixed fasta prep typo
Dec 6, 2024
89adfd1
removed macpus
Dec 6, 2024
7f33262
named process
Dec 6, 2024
5f812b7
removed quotations around input
erinyoung Dec 6, 2024
29959fe
fixed fastas input channel
erinyoung Dec 6, 2024
8ea0ea5
adjusted cpus
erinyoung Dec 6, 2024
82a2948
fixed elements
erinyoung Dec 6, 2024
2b0aeca
updated samtools qc filenames
erinyoung Dec 6, 2024
ecf79a7
fixed filtering command
erinyoung Dec 6, 2024
ece6166
removed if
erinyoung Dec 6, 2024
8d4740d
increased to low
erinyoung Dec 6, 2024
ae8171a
added stage
erinyoung Dec 6, 2024
92739ed
adjusted conditionals
erinyoung Dec 6, 2024
0a462d5
fixed multiqc channel
erinyoung Dec 6, 2024
730ebdb
updated result tree
erinyoung Dec 6, 2024
3cf3bff
consensus for sra
erinyoung Dec 6, 2024
275c79a
removed vadr
erinyoung Dec 9, 2024
aa75cb9
ignore samtools ampliconstats error
erinyoung Dec 9, 2024
1b4796e
added wildcard to path name
erinyoung Dec 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added stage
erinyoung committed Dec 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ae8171a98f7605f4eef4c1c37a620adda469df8c
15 changes: 7 additions & 8 deletions modules/local/samtools.nf
Original file line number Diff line number Diff line change
@@ -3,8 +3,6 @@ process SAMTOOLS_QC {
label "process_single"
container 'staphb/samtools:1.21'



input:
tuple val(meta), file(bam)

@@ -27,43 +25,44 @@ process SAMTOOLS_QC {
def flagstat_args = task.ext.flagstat_args ?: "${params.samtools_flagstat_options}"
def depth_args = task.ext.depth_args ?: "${params.samtools_depth_options}"
def prefix = task.ext.prefix ?: "${meta.id}"
def which_stage = bam.baseName.contains('primertrim') ? 'final' : 'initial'
"""
mkdir -p samtools logs/${task.process}
log=logs/${task.process}/${prefix}.${workflow.sessionId}.log
log=logs/${task.process}/${prefix}.${which_stage}.${workflow.sessionId}.log

date > \$log
samtools --version >> \$log

samtools stats \
${stats_args} \
${bam} \
> samtools/${prefix}.stats.txt
> samtools/${prefix}.${which_stage}.stats.txt

samtools coverage \
${coverage_args} \
${bam} \
-m \
-o \
samtools/${prefix}.cov.hist \
samtools/${prefix}.${which_stage}.cov.hist \
| tee -a \$log

samtools coverage \
${coverage_args} \
${bam} \
| awk -v sample=${prefix} '{print sample "\\t" \$0 }' \
| sed '0,/${prefix}/s//sample/' \
> samtools/${prefix}.cov.txt \
> samtools/${prefix}.${which_stage}.cov.txt \
| tee -a \$log

samtools flagstat \
${flagstat_args} \
${bam} \
| tee samtools/${prefix}.flagstat.txt
| tee samtools/${prefix}.${which_stage}.flagstat.txt

samtools depth \
${depth_args} \
${bam} \
> samtools/${prefix}.depth.txt
> samtools/${prefix}.${which_stage}.depth.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":