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
vvanoost
nextflow
Commits
90eb71d6
Commit
90eb71d6
authored
6 years ago
by
vvanoost
Browse files
Options
Downloads
Patches
Plain Diff
correction SAM tools
parent
82032aa9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/RNAseq_sen1D.nf
+54
-20
54 additions, 20 deletions
src/RNAseq_sen1D.nf
with
54 additions
and
20 deletions
src/RNAseq_sen1D.nf
+
54
−
20
View file @
90eb71d6
...
@@ -156,47 +156,81 @@ fi
...
@@ -156,47 +156,81 @@ fi
"""
"""
}
}
/* bams s
or
ting */
/* bams s
pli
ting
*/
process
sort_bam
{
process
split_bam
{
tag
"$bam.baseName"
tag
"$pair_id"
cpus
4
cpus
2
input:
set
pair_id
,
file
(
bam
)
from
bam_files
output:
set
pair_id
,
"*_forward.bam"
into
forward_bam_files
set
pair_id
,
"*_reverse.bam"
into
reverse_bam_files
script:
"""
"""
samtools sort -@ ${task.cpus} -O BAM -o ${bam.baseName}_sorted.bam ${bam}
samtools view -hb -F 0x10 ${bam} > ${pair_id}_forward.bam &
samtools view -hb -f 0x10 ${bam} > ${pair_id}_reverse.bam
"""
"""
}
}
/* bams
index
ing
*/
/* bams
sort
ing */
process
index_bam
{
process
sort_bam_forward
{
tag
"$bam.baseName"
tag
"$pair_id"
cpus
4
publishDir
"results/mapping/bams/"
,
mode:
'copy'
input:
input:
file
bam
from
sorted_bam_files
set
pair_id
,
file
(
bam
)
from
forward_bam_files
output:
output:
file
"*bam*"
into
indexed_bam_file
set
pair_id
,
"*_sorted.bam"
into
forward_sorted_bam_files
script:
script:
"""
"""
samtools
index
${bam}
samtools
sort -@ ${task.cpus} -O BAM -o ${pair_id}_forward_sorted.bam
${bam}
"""
"""
}
}
process
sort_bam_reverse
{
tag
"$pair_id"
cpus
4
publishDir
"results/mapping/bams/"
,
mode:
'copy'
input:
set
pair_id
,
file
(
bam
)
from
reverse_bam_files
output:
set
pair_id
,
"*_sorted.bam"
into
reverse_sorted_bam_files
/* bams spliting */
script:
"""
samtools sort -@ ${task.cpus} -O BAM -o ${pair_id}_reverse_sorted.bam ${bam}
"""
}
process
split_bam
{
/* bams indexing */
tag
"$bam.baseName"
cpus
2
process
index_bam_forward
{
tag
"$pair_id"
publishDir
"results/mapping/bams/"
,
mode:
'copy'
input:
input:
file
bam
from
indexed_bam_file
set
pair_id
,
file
(
bam
)
from
forward_sorted_bam_files
output:
set
pair_id
,
"*bam*"
into
forward_indexed_bam_file
script:
"""
samtools index ${bam}
"""
}
process
index_bam_reverse
{
tag
"$pair_id"
publishDir
"results/mapping/bams/"
,
mode:
'copy'
input:
set
pair_id
,
file
(
bam
)
from
reverse_sorted_bam_files
output:
output:
file
"*_forward.bam*"
into
forward_bam_files
set
pair_id
,
"*bam*"
into
reverse_indexed_bam_file
file
"*_reverse.bam*"
into
reverse_bam_files
script:
script:
"""
"""
samtools view -hb -F 0x10 ${bam} > ${bam}_forward.bam &
samtools index ${bam}
samtools view -hb -f 0x10 ${bam} > ${bam}_reverse.bam
"""
"""
}
}
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