Skip to content

Commit 76779cc

Browse files
committed
appears that sylph-tax is functional, isoquant taking far too long on transcriptomics data, further testing and polishing needed
1 parent 22c587b commit 76779cc

File tree

6 files changed

+76
-12
lines changed

6 files changed

+76
-12
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
process GET_SYLPH_TAX_DB {
2+
tag "SYLPH_TAX"
3+
label 'process_low'
4+
conda "${moduleDir}/environment.yml"
5+
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
6+
'https://depot.galaxyproject.org/singularity/sylph-tax:1.8.0--pyhdfd78af_0' :
7+
'biocontainers/sylph-tax:1.8.0--pyhdfd78af_0' }"
8+
9+
//input:
10+
//val outpath
11+
12+
output:
13+
path "tax_db" , emit: sylph_tax_db
14+
path "versions.yml" , emit: versions
15+
16+
when:
17+
task.ext.when == null || task.ext.when
18+
19+
script:
20+
//def prefix = task.ext.prefix ?: "${meta.id}_${meta.replicate}"
21+
22+
"""
23+
mkdir tax_db
24+
sylph-tax download --download-to tax_db
25+
26+
cat <<-END_VERSIONS > versions.yml
27+
"${task.process}":
28+
sylph_tax: \$(sylph-tax --version | cut -d" " -f2)
29+
END_VERSIONS
30+
"""
31+
32+
/* stub:
33+
//def prefix = task.ext.prefix ?: "${meta.id}_${meta.replicate}"
34+
35+
"""
36+
touch *.tsv.gz
37+
38+
cat <<-END_VERSIONS > versions.yml
39+
"${task.process}":
40+
sylph_tax: \$(sylph-tax --version | cut -d" " -f2)
41+
END_VERSIONS
42+
"""
43+
*/
44+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
process {
2+
withName: 'GET_SYLPH_TAX_DB' {
3+
publishDir = [
4+
path: { "${params.outdir}/profile_unmapped_reads/sylph" },
5+
//mode: params.publish_dir_mode
6+
]
7+
}
8+
}

modules/local/sylph/profile/nextflow.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
process {
2-
withName: 'SYLPH_PREPARE_REFERENCE' {
2+
withName: 'SYLPH_PROFILE' {
33
publishDir = [
44
path: { "${params.outdir}/profile_unmapped_reads/sylph" },
55
//mode: params.publish_dir_mode

modules/local/sylph/tax/main.nf

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,32 @@ process SYLPH_TAX {
88

99
input:
1010
tuple val(meta), path(sylph_profile)
11+
path database
1112
val database_name
1213

1314
output:
14-
tuple val(meta), path("*.sylphmpa") , emit: sylph_tax
15-
path "versions.yml" , emit: versions
15+
tuple val(meta), path("*.sylphmpa") , optional: true , emit: sylph_tax
16+
path "versions.yml" , emit: versions
1617

1718
when:
1819
task.ext.when == null || task.ext.when
1920

2021
script:
2122
def prefix = task.ext.prefix ?: "${meta.id}_${meta.replicate}"
2223

23-
"""
24-
sylph-tax download --download-to .
2524

26-
sylph-tax taxprof \\
25+
"""
26+
sylph-tax \\
27+
--no-config \\
28+
--taxonomy-dir $database \\
29+
taxprof \\
2730
$sylph_profile \\
28-
--taxonomy-dir !PWD \\
2931
-t $database_name \\
3032
-o ${prefix}_sylph_tax.sylphmpa
3133
3234
cat <<-END_VERSIONS > versions.yml
3335
"${task.process}":
34-
sylph_profile: \$(sylph-tax --version | cut -d" " -f2')
36+
sylph_tax: \$(sylph-tax --version | cut -d" " -f2)
3537
END_VERSIONS
3638
"""
3739

@@ -42,7 +44,7 @@ process SYLPH_TAX {
4244
touch ${prefix}_sylph_tax.sylphmpa
4345
cat <<-END_VERSIONS > versions.yml
4446
"${task.process}":
45-
sylph_profile: \$(sylph-tax --version | cut -d" " -f2')
47+
sylph_tax: \$(sylph-tax --version | cut -d" " -f2)
4648
END_VERSIONS
4749
"""
4850
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
process {
2+
withName: 'SYLPH_TAX' {
3+
publishDir = [
4+
path: { "${params.outdir}/profile_unmapped_reads/sylph" },
5+
//mode: params.publish_dir_mode
6+
]
7+
}
8+
}

subworkflows/local/profile_unmapped_reads/main.nf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//include { SYLPH_PREPARE_REFERENCE } from '../../../modules/local/sylph/prepare_reference'
22
include { SYLPH_PROFILE } from '../../../modules/local/sylph/profile'
3+
include { GET_SYLPH_TAX_DB } from '../../../modules/local/sylph/get_tax_database'
34
include { SYLPH_TAX } from '../../../modules/local/sylph/tax'
45

56
workflow PROFILE_UNMAPPED_READS {
@@ -13,12 +14,13 @@ workflow PROFILE_UNMAPPED_READS {
1314

1415
ch_versions = Channel.empty()
1516

16-
//ch_sylph_database = SYLPH_PREPARE_REFERENCE.out.database
17-
1817
SYLPH_PROFILE( unmapped_reads, sylph_database )
1918
ch_sylph_profile = SYLPH_PROFILE.out.sylph_profile
2019

21-
SYLPH_TAX( ch_sylph_profile, sylph_database_name )
20+
GET_SYLPH_TAX_DB()
21+
ch_sylph_tax_db = GET_SYLPH_TAX_DB.out.sylph_tax_db
22+
23+
SYLPH_TAX( ch_sylph_profile, ch_sylph_tax_db, sylph_database_name )
2224
ch_sylph_tax = SYLPH_TAX.out.sylph_tax
2325

2426
emit:

0 commit comments

Comments
 (0)