Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nextflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LBMC
nextflow
Commits
81a2d4bb
Verified
Commit
81a2d4bb
authored
6 years ago
by
Laurent Modolo
Browse files
Options
Downloads
Patches
Plain Diff
Bowtie2: modify single-end to have a file_id variable like for
paired-end
parent
52e09505
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nf_modules/Bowtie2/bowtie2.nf
+7
-6
7 additions, 6 deletions
src/nf_modules/Bowtie2/bowtie2.nf
src/nf_modules/Bowtie2/tests/mapping_single.nf
+7
-6
7 additions, 6 deletions
src/nf_modules/Bowtie2/tests/mapping_single.nf
with
14 additions
and
12 deletions
src/nf_modules/Bowtie2/bowtie2.nf
+
7
−
6
View file @
81a2d4bb
...
...
@@ -101,6 +101,7 @@ log.info "index files : ${params.index}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { fastq_files }
Channel
.fromPath( params.index )
...
...
@@ -108,16 +109,16 @@ Channel
.set { index_files }
process mapping_fastq {
tag "$
reads.baseName
"
tag "$
file_id
"
cpus 4
publishDir "results/mapping/bams/", mode: 'copy'
input:
file
reads from fastq_files
set file_id, file(
reads
)
from fastq_files
file index from index_files.collect()
output:
file
"*.bam" into bam_files
set file_id,
"*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
...
...
@@ -130,10 +131,10 @@ process mapping_fastq {
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \
-U ${reads} 2> \
${
reads.baseName
}_bowtie2_report.txt | \
samtools view -Sb - > ${
reads.baseName
}.bam
${
file_id
}_bowtie2_report.txt | \
samtools view -Sb - > ${
file_id
}.bam
if grep -q "Error" ${
reads.baseName
}_bowtie2_report.txt; then
if grep -q "Error" ${
file_id
}_bowtie2_report.txt; then
exit 1
fi
"""
...
...
This diff is collapsed.
Click to expand it.
src/nf_modules/Bowtie2/tests/mapping_single.nf
+
7
−
6
View file @
81a2d4bb
...
...
@@ -6,6 +6,7 @@ log.info "index files : ${params.index}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { fastq_files }
Channel
.fromPath( params.index )
...
...
@@ -13,16 +14,16 @@ Channel
.set { index_files }
process mapping_fastq {
tag "$
reads.baseName
"
tag "$
file_id
"
cpus 4
publishDir "results/mapping/bams/", mode: 'copy'
input:
file
reads from fastq_files
set file_id, file(
reads
)
from fastq_files
file index from index_files.collect()
output:
file
"*.bam" into bam_files
set file_id,
"*.bam" into bam_files
file "*_report.txt" into mapping_report
script:
...
...
@@ -35,10 +36,10 @@ process mapping_fastq {
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index_id} \
-U ${reads} 2> \
${
reads.baseName
}_bowtie2_report.txt | \
samtools view -Sb - > ${
reads.baseName
}.bam
${
file_id
}_bowtie2_report.txt | \
samtools view -Sb - > ${
file_id
}.bam
if grep -q "Error" ${
reads.baseName
}_bowtie2_report.txt; then
if grep -q "Error" ${
file_id
}_bowtie2_report.txt; then
exit 1
fi
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment