1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-22 22:59:55 +00:00

Merge pull request #110 from genomic-medicine-sweden/update_centrifuge_kreport

Update centrifuge kreport
This commit is contained in:
Sofia Stamouli 2022-07-28 10:36:30 +02:00 committed by GitHub
commit ba928af5ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 7 deletions

View file

@ -145,7 +145,7 @@ process {
publishDir = [ publishDir = [
path: { "${params.outdir}/filtlong" }, path: { "${params.outdir}/filtlong" },
mode: params.publish_dir_mode, mode: params.publish_dir_mode,
pattern: '*.fastq.gz', pattern: '*.{fastq.gz,log}',
enabled: params.save_preprocessed_reads enabled: params.save_preprocessed_reads
] ]
} }
@ -347,6 +347,7 @@ process {
} }
withName: CENTRIFUGE_KREPORT { withName: CENTRIFUGE_KREPORT {
errorStrategy = {task.exitStatus == 255 ? 'ignore' : 'retry'}
ext.args = { "${meta.db_params}" } ext.args = { "${meta.db_params}" }
ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" } ext.prefix = params.perform_runmerging ? { "${meta.id}-${meta.db_name}" } : { "${meta.id}-${meta.run_accession}-${meta.db_name}" }
publishDir = [ publishDir = [

View file

@ -22,7 +22,7 @@
"git_sha": "d2726fcf75063960f06b36d2229a4c0966614108" "git_sha": "d2726fcf75063960f06b36d2229a4c0966614108"
}, },
"centrifuge/kreport": { "centrifuge/kreport": {
"git_sha": "be4ae28c3c95b3c4047a7d9fb4cb0ed749631cea" "git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838"
}, },
"custom/dumpsoftwareversions": { "custom/dumpsoftwareversions": {
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"

View file

@ -8,7 +8,7 @@ process CENTRIFUGE_KREPORT {
'quay.io/biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }" 'quay.io/biocontainers/centrifuge:1.0.4_beta--h9a82719_6' }"
input: input:
tuple val(meta), path(results) tuple val(meta), path(report)
path db path db
output: output:
@ -23,7 +23,7 @@ process CENTRIFUGE_KREPORT {
def prefix = task.ext.prefix ?: "${meta.id}" def prefix = task.ext.prefix ?: "${meta.id}"
""" """
db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/.1.cf//'` db_name=`find -L ${db} -name "*.1.cf" -not -name "._*" | sed 's/.1.cf//'`
centrifuge-kreport -x \$db_name ${results} > ${prefix}.txt centrifuge-kreport -x \$db_name ${report} > ${prefix}.txt
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":

View file

@ -15,9 +15,9 @@ input:
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- results: - report:
type: file type: file
description: File containing the centrifuge classification results description: File containing the centrifuge classification report
pattern: "*.{txt}" pattern: "*.{txt}"
output: output:

View file

@ -148,7 +148,7 @@ workflow PROFILING {
} }
CENTRIFUGE_CENTRIFUGE ( ch_input_for_centrifuge.reads, ch_input_for_centrifuge.db, params.centrifuge_save_reads, params.centrifuge_save_reads, params.centrifuge_save_reads ) CENTRIFUGE_CENTRIFUGE ( ch_input_for_centrifuge.reads, ch_input_for_centrifuge.db, params.centrifuge_save_reads, params.centrifuge_save_reads, params.centrifuge_save_reads )
CENTRIFUGE_KREPORT (CENTRIFUGE_CENTRIFUGE.out.results, ch_input_for_centrifuge.db) CENTRIFUGE_KREPORT (CENTRIFUGE_CENTRIFUGE.out.report, ch_input_for_centrifuge.db)
ch_versions = ch_versions.mix( CENTRIFUGE_CENTRIFUGE.out.versions.first() ) ch_versions = ch_versions.mix( CENTRIFUGE_CENTRIFUGE.out.versions.first() )
ch_raw_classifications = ch_raw_classifications.mix( CENTRIFUGE_CENTRIFUGE.out.results ) ch_raw_classifications = ch_raw_classifications.mix( CENTRIFUGE_CENTRIFUGE.out.results )
ch_raw_profiles = ch_raw_profiles.mix( CENTRIFUGE_KREPORT.out.kreport ) ch_raw_profiles = ch_raw_profiles.mix( CENTRIFUGE_KREPORT.out.kreport )