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

stub ready and working #139

Merged
merged 8 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
6 changes: 6 additions & 0 deletions modules/checkV.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ process checkV {
checkv quality_summary ${fasta} results #2> /dev/null
cp results/quality_summary.tsv ${name}_quality_summary.tsv #2> /dev/null
"""
stub:
"""
mkdir negative_result_${name}.txt
echo "contig_id contig_length genome_copies gene_count viral_genes host_genes checkv_quality miuvig_quality completeness completeness_method contamination provirus termini warnings" > ${name}_quality_summary.tsv
echo "pos_phage_0 146647 1.0 243 141 1 High-quality High-quality 97.03 AAI-based 0.0 No" >> ${name}_quality_summary.tsv
"""
}
7 changes: 7 additions & 0 deletions modules/chromomap.nf
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,11 @@ process chromomap {
"""
echo "nothing found" > sample_overview_${type}.html
"""
stub:
"""
touch sample_overview_${type}.html
"""
}



4 changes: 4 additions & 0 deletions modules/databases/download_checkV_DB.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ process download_checkV_DB {
tar -zxvf checkv-db-v0.6.tar.gz
rm checkv-db-v0.6.tar.gz
"""
stub:
"""
mkdir checkv-db-v0.6
mult1fractal marked this conversation as resolved.
Show resolved Hide resolved
"""
}
8 changes: 8 additions & 0 deletions modules/databases/download_pvog_DB.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ process pvog_DB {
wget -nH ftp://ftp.ebi.ac.uk/pub/databases/metagenomics/viral-pipeline/hmmer_databases/pvogs.tar.gz && tar -zxvf pvogs.tar.gz
rm pvogs.tar.gz
"""
stub:
"""
mkdir pvogs
mult1fractal marked this conversation as resolved.
Show resolved Hide resolved
"""
}

process vogtable_DB {
Expand All @@ -21,6 +25,10 @@ process vogtable_DB {
"""
wget -nH http://dmk-brain.ecn.uiowa.edu/pVOGs/downloads/VOGTable.txt
"""
stub:
"""
touch VOGTable.txt
"""
}

/*
Expand Down
4 changes: 4 additions & 0 deletions modules/databases/download_references.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ process download_references {
git clone -b WtP-v0.9 https://github.com/mult1fractal/WtP_phage_reference_db-WtP_v0.9.0.git
cat WtP_phage_reference_db-WtP_v0.9.0/fasta-files/*.fa > phage_references.fa
"""
stub:
"""
touch phage_references.fa
"""
}
5 changes: 5 additions & 0 deletions modules/databases/phage_references_blastDB.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ process phage_references_blastDB {
mkdir phage_blast_DB && mv phage_db.* phage_blast_DB
tar czf blast_database.tar.gz phage_blast_DB/
"""
stub:
"""
mkdir phage_blast_DB
tar czf blast_database.tar.gz phage_blast_DB/
"""
}

//phage_blast_DB/phage_db.*
4 changes: 4 additions & 0 deletions modules/databases/ppr_download_dependencies.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ process ppr_download_dependencies {
"""
git clone https://github.com/Stormrider935/PPR-Meta.git
"""
stub:
"""
mkdir PPR-Meta
mult1fractal marked this conversation as resolved.
Show resolved Hide resolved
"""
}
8 changes: 6 additions & 2 deletions modules/databases/sourmash_download_DB.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ process sourmash_download_DB {
else { storeDir "${params.databases}/sourmash/" }
label 'sourmash'
input:
file(references)
path(references)
output:
file("phages.sbt.zip")
path("phages.sbt.zip")
script:
"""
sourmash compute --scaled 100 -k 21 --singleton --seed 42 -p 8 -o phages.sig ${references}
sourmash index phages.sbt.zip phages.sig
"""
stub:
"""
touch phages.sbt.zip
"""
}
5 changes: 5 additions & 0 deletions modules/databases/vibrant_download_DB.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ process vibrant_download_DB {
cp /opt/conda/share/vibrant-1.0.1/files/VIBRANT*.{tsv,sav} database
tar -czf database.tar.gz database/
"""
stub:
"""
mkdir database
tar -czf database.tar.gz database/
"""
}


Expand Down
4 changes: 4 additions & 0 deletions modules/databases/virsorter2_download_DB.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ process virsorter2_download_DB {
chmod -R a+rX db
rm db.tgz
"""
stub:
"""
mkdir db
mult1fractal marked this conversation as resolved.
Show resolved Hide resolved
"""
}

4 changes: 4 additions & 0 deletions modules/databases/virsorter_download_DB.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ process virsorter_download_DB {
tar -xvzf virsorter-data-v2.tar.gz
rm virsorter-data-v2.tar.gz
"""
stub:
"""
mkdir virsorter-data
"""
}


Expand Down
4 changes: 4 additions & 0 deletions modules/hmmscan.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ process hmmscan {
"""
hmmscan --cpu ${task.cpus} ${params.hmm_params} --noali --domtblout ${name}_${pvog_db}_hmmscan.tbl ${pvog_db}/${pvog_db}.hmm ${faa}
"""
stub:
"""
touch ${name}_${pvog_db}_hmmscan.tbl
"""
}


Expand Down
4 changes: 4 additions & 0 deletions modules/hue_heatmap.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ process hue_heatmap {
"""
hue_heatmap_plot.py --input *.tsv --output ${name}_phage-distribution.pdf
"""
stub:
"""
touch ${name}_phage-distribution.pdf
"""
}
8 changes: 6 additions & 2 deletions modules/input_suffix_check.nf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
process input_suffix_check {
label 'ubuntu'
input:
tuple val(name), file(file)
tuple val(name), path(file)
output:
tuple val(name), file("${name}.fa")
tuple val(name), path("${name}.fa")
script:
"""
case "${file}" in
Expand Down Expand Up @@ -32,6 +32,10 @@ process input_suffix_check {
# remove empty lines
sed '/^\$/d' -i ${name}.fa
"""
stub:
"""
touch ${name}.fa
"""
}


Expand Down
4 changes: 4 additions & 0 deletions modules/normalize_contig_size.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ process normalize_contig_size {
"""
cut.py --size 3000 --genome ${fasta} --outfile ${name}_fragments.fasta
"""
stub:
"""
touch ${name}_fragments.fasta
"""
}

11 changes: 11 additions & 0 deletions modules/parser/chromomap_parser.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,15 @@ process chromomap_parser {
grep --no-messages -w "\$f1" annotationfile.tbl 1>> small/annotationfile.tbl || true
done < small/chromosomefile.tbl
"""
stub:
"""
mkdir small
mkdir large

touch small/chromosomefile.tbl
touch small/annotationfile.tbl

touch large/chromosomefile.tbl
touch large/annotationfile.tbl
"""
}
4 changes: 4 additions & 0 deletions modules/parser/filter_virnet.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ process filter_virnet {
# extract correct positive contigs
parse_virnet.py --input all_virnet_results.txt --output virnet_\${PWD##*/}.tsv
"""
stub:
"""
mkdir touch virnet_\${PWD##*/}.tsv
"""
}
4 changes: 4 additions & 0 deletions modules/prodigal.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ process prodigal {
"""
prodigal -p "meta" -a ${name}_prodigal.faa -i ${positive_contigs}
"""
stub:
"""
touch ${name}_prodigal.faa
"""
}
5 changes: 5 additions & 0 deletions modules/raw_data_collection/deepvirfinder_collect_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ process deepvirfinder_collect_data {
tail -q -n+2 ${output_lists} >> deepvirfinder/${name}_overview.txt
tar -czf deepvirfinder_results_${name}.tar.gz deepvirfinder
"""
stub:
"""
mkdir deepvirfinder
tar -czf deepvirfinder_results_${name}.tar.gz deepvirfinder
"""
}
18 changes: 14 additions & 4 deletions modules/raw_data_collection/metaphinder_collect_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ process metaphinder_collect_data {
publishDir "${params.output}/${name}/raw_data", mode: 'copy', pattern: "metaphinder_results_${name}.tar.gz"
label 'ubuntu'
input:
tuple val(name), file(output_lists), file(output_blasts)
tuple val(name), path(output_lists), path(output_blasts)
output:
tuple val(name), file("metaphinder_results_${name}.tar.gz")
tuple val(name), path("metaphinder_results_${name}.tar.gz")
script:
"""
mkdir -p metaphinder/blast_results
Expand All @@ -13,15 +13,20 @@ process metaphinder_collect_data {
cp ${output_blasts} metaphinder/blast_results
tar -czf metaphinder_results_${name}.tar.gz metaphinder
"""
stub:
"""
mkdir metaphinder
tar -czf metaphinder_results_${name}.tar.gz metaphinder
"""
}

process metaphinder_collect_data_ownDB {
publishDir "${params.output}/${name}/raw_data", mode: 'copy', pattern: "metaphinder_ownDB_results_${name}.tar.gz"
label 'ubuntu'
input:
tuple val(name), file(output_lists), file(output_blasts)
tuple val(name), path(output_lists), path(output_blasts)
output:
tuple val(name), file("metaphinder_ownDB_results_${name}.tar.gz")
tuple val(name), path("metaphinder_ownDB_results_${name}.tar.gz")
script:
"""
mkdir -p metaphinder_ownDB/blast_results
Expand All @@ -30,4 +35,9 @@ process metaphinder_collect_data_ownDB {
cp ${output_blasts} metaphinder_ownDB/blast_results
tar -czf metaphinder_ownDB_results_${name}.tar.gz metaphinder_ownDB
"""
stub:
"""
mkdir metaphinder_ownDB
tar -czf metaphinder_ownDB_results_${name}.tar.gz metaphinder_ownDB
"""
}
5 changes: 5 additions & 0 deletions modules/raw_data_collection/phigaro_collect_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ process phigaro_collect_data {
cp -r ${rawdir}/* phigaro
tar -czf phigaro_results_${name}.tar.gz phigaro
"""
stub:
"""
mkdir phigaro
tar -czf phigaro_results_${name}.tar.gz phigaro
"""
}
9 changes: 7 additions & 2 deletions modules/raw_data_collection/pprmeta_collect_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ process pprmeta_collect_data {
publishDir "${params.output}/${name}/raw_data", mode: 'copy', pattern: "pprmeta_results_${name}.tar.gz"
label 'ubuntu'
input:
tuple val(name), file(output_lists)
tuple val(name), path(output_lists)
output:
tuple val(name), file("pprmeta_results_${name}.tar.gz")
tuple val(name), path("pprmeta_results_${name}.tar.gz")
script:
"""
cat ${output_lists} | head -1 > ${name}_overview.txt
tail -q -n+2 ${output_lists} >> ${name}_overview.txt
tar -czf pprmeta_results_${name}.tar.gz ${name}_overview.txt
"""
stub:
mult1fractal marked this conversation as resolved.
Show resolved Hide resolved
"""
touch ${name}_overview.txt
tar -czf pprmeta_results_${name}.tar.gz ${name}_overview.txt
"""
}
9 changes: 7 additions & 2 deletions modules/raw_data_collection/sourmash_collect_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ process sourmash_collect_data {
publishDir "${params.output}/${name}/raw_data", mode: 'copy', pattern: "sourmash_results_${name}.tar.gz"
label 'ubuntu'
input:
tuple val(name), file(output_lists)
tuple val(name), path(output_lists)
output:
tuple val(name), file("sourmash_results_${name}.tar.gz")
tuple val(name), path("sourmash_results_${name}.tar.gz")
script:
"""
echo "similarity,name,filename,md5" > ${name}_overview.txt
tail -q -n +2 ${output_lists} >> ${name}_overview.txt
tar -czf sourmash_results_${name}.tar.gz ${name}_overview.txt
"""
stub:
"""
touch ${name}_overview.txt
tar -czf sourmash_results_${name}.tar.gz ${name}_overview.txt
"""
}
18 changes: 14 additions & 4 deletions modules/raw_data_collection/vibrant_collect_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ process vibrant_collect_data {
publishDir "${params.output}/${name}/raw_data", mode: 'copy', pattern: "vibrant_results_${name}.tar.gz"
label 'ubuntu'
input:
tuple val(name), file(output_lists), file(dirs)
tuple val(name), path(output_lists), path(dirs)
output:
tuple val(name), file("vibrant_results_${name}.tar.gz")
tuple val(name), path("vibrant_results_${name}.tar.gz")
script:
"""
mkdir -p vibrant/results
Expand All @@ -13,16 +13,21 @@ process vibrant_collect_data {
tail -q -n +2 ${output_lists} >> vibrant/${name}_overview.txt
tar -czf vibrant_results_${name}.tar.gz vibrant
"""
stub:
"""
mkdir vibrant
tar -czf vibrant_results_${name}.tar.gz vibrant
"""
}


process vibrant_virome_collect_data {
publishDir "${params.output}/${name}/raw_data", mode: 'copy', pattern: "vibrant_virome_results_${name}.tar.gz"
label 'ubuntu'
input:
tuple val(name), file(output_lists), file(dirs)
tuple val(name), path(output_lists), path(dirs)
output:
tuple val(name), file("vibrant_virome_results_${name}.tar.gz")
tuple val(name), path("vibrant_virome_results_${name}.tar.gz")
script:
"""
mkdir -p vibrant/results
Expand All @@ -31,4 +36,9 @@ process vibrant_virome_collect_data {
tail -q -n +2 ${output_lists} >> vibrant/${name}_overview.txt
tar -czf vibrant_virome_results_${name}.tar.gz vibrant
"""
stub:
"""
mkdir vibrant
tar -czf vibrant_virome_results_${name}.tar.gz vibrant
"""
}
5 changes: 5 additions & 0 deletions modules/raw_data_collection/virfinder_collect_data.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ process virfinder_collect_data {
cp ${output_lists} virfinder
tar -czf virfinder_results_${name}.tar.gz virfinder
"""
stub:
"""
mkdir virfinder
tar -czf virfinder_results_${name}.tar.gz virfinder
"""
}
Loading