Skip to content

Commit a2b2112

Browse files
authored
Merge pull request #39 from nf-core/jessicarowell/add-basic-funcann-workflow
add ch_fasta to FUNCTIONAL_ANNOTATION subworkflow as input to annotators
2 parents df20d32 + fb79280 commit a2b2112

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

  • subworkflows/local/functional_annotation

subworkflows/local/functional_annotation/main.nf

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Import Annotator Subworfklows
2+
13
workflow FUNCTIONAL_ANNOTATION {
24

35
take:
@@ -9,9 +11,25 @@ workflow FUNCTIONAL_ANNOTATION {
911

1012
// TODO nf-core: substitute modules here for the modules of your subworkflow
1113

14+
// Create a multifasta, with one fasta per entry, add the sequence ID to the meta id
15+
ch_fasta
16+
.map {
17+
meta, fasta ->
18+
[
19+
[id:"${meta.id}_${fasta[0].splitFasta(record: [id: true]).id[0].replaceAll(/\|/, '-')}"] ,
20+
fasta[0].splitFasta(file:true)
21+
]
22+
}
23+
.transpose()
24+
.view()
25+
.set { ch_multifasta }
26+
27+
//
28+
// SUBWORKFLOW: Annotator Name
29+
//
30+
1231
emit:
1332
// TODO nf-core: edit emitted channels
1433

1534
versions = ch_versions // channel: [ versions.yml ]
1635
}
17-

0 commit comments

Comments
 (0)