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
9a0dddaa
Commit
9a0dddaa
authored
6 years ago
by
vvanoost
Browse files
Options
Downloads
Patches
Plain Diff
change cut to cut4 in trimming process
parent
c791976f
Branches
Branches containing commit
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
+84
-1
84 additions, 1 deletion
src/RNAseq_sen1D.nf
with
84 additions
and
1 deletion
src/RNAseq_sen1D.nf
+
84
−
1
View file @
9a0dddaa
...
@@ -48,7 +48,7 @@ process 4_random_bases_trimming {
...
@@ -48,7 +48,7 @@ process 4_random_bases_trimming {
set
pair_id
,
file
(
reads
)
from
fastq_files_cut
set
pair_id
,
file
(
reads
)
from
fastq_files_cut
output:
output:
set
pair_id
,
"*_cut4_R{1,2}.fastq.gz"
into
fastq_files_cut
set
pair_id
,
"*_cut4_R{1,2}.fastq.gz"
into
fastq_files_cut
4
script:
script:
"""
"""
...
@@ -87,3 +87,86 @@ UrQt --t 20 --m ${task.cpus} --gz \
...
@@ -87,3 +87,86 @@ UrQt --t 20 --m ${task.cpus} --gz \
> ${pair_id}_trimming_report.txt
> ${pair_id}_trimming_report.txt
"""
"""
}
}
/*
* Bowtie2 :
* Imputs : fastq files
* Imputs : fasta files
* Output : bam files
*/
/* fasta indexing */
params
.
fasta
=
"$baseDir/data/bam/*.fasta"
log
.
info
"fasta files : ${params.fasta}"
Channel
.
fromPath
(
params
.
fasta
)
.
ifEmpty
{
error
"Cannot find any bam files matching: ${params.fasta}"
}
.
set
{
fasta_file
}
process
index_fasta
{
tag
"$fasta.baseName"
cpus
4
publishDir
"results/mapping/index/"
,
mode:
'copy'
input:
file
fasta
from
fasta_file
output:
file
"*.index*"
into
index_files
script:
"""
bowtie2-build --threads ${task.cpus} ${fasta} ${fasta.baseName}.index &> ${fasta.baseName}_bowtie2_report.txt
if grep -q "Error" ${fasta.baseName}_bowtie2_report.txt; then
exit 1
fi
"""
}
/*
* for paired-end data
*/
params
.
fastq
=
"$baseDir/data/fastq/*_{1,2}.fastq"
params
.
index
=
"$baseDir/data/index/*.index.*"
log
.
info
"fastq files : ${params.fastq}"
log
.
info
"index files : ${params.index}"
Channel
.
fromFilePairs
(
params
.
fastq
)
.
ifEmpty
{
error
"Cannot find any fastq files matching: ${params.fastq}"
}
.
set
{
fastq_files
}
Channel
.
fromPath
(
params
.
index
)
.
ifEmpty
{
error
"Cannot find any index files matching: ${params.index}"
}
.
set
{
index_files
}
process
mapping_fastq
{
tag
"$pair_id"
cpus
4
publishDir
"results/mapping/bams/"
,
mode:
'copy'
input:
set
pair_id
,
file
(
reads
)
from
fastq_files
file
index
from
index_files
.
toList
()
output:
set
pair_id
,
"*.bam"
into
bam_files
script:
"""
bowtie2 --very-sensitive -p ${task.cpus} -x ${index[0].baseName} \
-1 ${reads[0]} -2 ${reads[1]} 2> \
${pair_id}_bowtie2_report.txt | \
samtools view -Sb - > ${pair_id}.bam
if grep -q "Error" ${pair_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