mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Support batch fasta analysis
This commit is contained in:
parent
012f085378
commit
57db28386e
2 changed files with 21 additions and 9 deletions
|
@ -8,10 +8,10 @@ process BUSCO {
|
|||
'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(fasta) // Required: meta map, and fasta sequence file
|
||||
each lineage // Required: lineage to check against
|
||||
path busco_lineages_path // Recommended: path to busco lineages - downloads if not set
|
||||
path config_file // Optional: busco configuration file
|
||||
tuple val(meta), path(fasta, stageAs: 'tmp_input/*') // Required: meta map, and fasta sequence files
|
||||
each lineage // Required: lineage to check against
|
||||
path busco_lineages_path // Recommended: path to busco lineages - downloads if not set
|
||||
path config_file // Optional: busco configuration file
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*-busco"), emit: busco_dir
|
||||
|
@ -50,11 +50,21 @@ process BUSCO {
|
|||
fi
|
||||
|
||||
# Ensure the input is uncompressed
|
||||
gzip -cdf $fasta > ${prefix}_uncompressed.fasta
|
||||
INPUT_SEQS=input_seqs
|
||||
mkdir "\$INPUT_SEQS"
|
||||
cd "\$INPUT_SEQS"
|
||||
for FASTA in ../tmp_input/*; do
|
||||
if [ "\${FASTA##*.}" == 'gz' ]; then
|
||||
gzip -cdf "\$FASTA" > \$( basename "\$FASTA" .gz )
|
||||
else
|
||||
ln -s "\$FASTA" .
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
||||
busco \\
|
||||
--cpu $task.cpus \\
|
||||
--in ${prefix}_uncompressed.fasta \\
|
||||
--in "\$INPUT_SEQS" \\
|
||||
--out ${prefix}-busco \\
|
||||
--lineage_dataset $lineage \\
|
||||
$busco_lineage_dir \\
|
||||
|
@ -62,7 +72,7 @@ process BUSCO {
|
|||
$args
|
||||
|
||||
# clean up
|
||||
rm ${prefix}_uncompressed.fasta
|
||||
rm -rf "\$INPUT_SEQS"
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -9,7 +9,10 @@ workflow test_busco {
|
|||
|
||||
input = [
|
||||
[ id:'test', single_end:false ], // meta map
|
||||
file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true)
|
||||
[
|
||||
file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true),
|
||||
file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true)
|
||||
]
|
||||
]
|
||||
|
||||
BUSCO (
|
||||
|
@ -20,4 +23,3 @@ workflow test_busco {
|
|||
)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue