Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Optional input:
* inception: if enabled it uses an inception, only valid for BWA aln, it requires a fast file system such as flash (default: false)
* skip_trimming: skips the read trimming step
* star_two_pass_mode: activates STAR two-pass mode, increasing sensitivity of novel junction discovery, recommended for RNA variant calling (default: false)
* star_sort_by_coordinate: Sort STAR output BAM file by coordinate (default: false)
* additional_args: additional alignment arguments, only effective in BWA mem, BWA mem 2 and STAR (default: none)

Output:
Expand Down
8 changes: 6 additions & 2 deletions modules/02_star.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ process STAR {

script:
two_pass_mode_param = params.star_two_pass_mode ? "--twopassMode Basic" : ""
sort = params.star_sort_by_coordinate ? "SortedByCoordinate" : ""
"""
STAR --genomeDir ${reference} ${two_pass_mode_param} ${params.additional_args} \
--readFilesCommand "gzip -d -c -f" \
--readFilesIn ${fastq1} ${fastq2} \
--outSAMmode Full \
--outSAMattributes Standard \
--outSAMunmapped None \
--outSAMtype BAM ${sort} \
--outReadsUnmapped Fastx \
--outFilterMismatchNoverLmax 0.02 \
--runThreadN ${task.cpus} \
--outFileNamePrefix ${name}.

mv ${name}.Aligned.sortedByCoord.out.bam ${name}.bam
mv ${name}.Aligned*.out.bam ${name}.bam

echo ${params.manifest} >> software_versions.STAR.txt
STAR --version >> software_versions.STAR.txt
Expand All @@ -56,19 +58,21 @@ process STAR_SE {

script:
two_pass_mode_param = params.star_two_pass_mode ? "--twopassMode Basic" : ""
sort = params.star_sort_by_coordinate ? "SortedByCoordinate" : ""
"""
STAR --genomeDir ${reference} ${two_pass_mode_param} ${params.additional_args} \
--readFilesCommand "gzip -d -c -f" \
--readFilesIn ${fastq} \
--outSAMmode Full \
--outSAMattributes Standard \
--outSAMunmapped None \
--outSAMtype BAM ${sort} \
--outReadsUnmapped Fastx \
--outFilterMismatchNoverLmax 0.02 \
--runThreadN ${task.cpus} \
--outFileNamePrefix ${name}.

mv ${name}.Aligned.sortedByCoord.out.bam ${name}.bam
mv ${name}.Aligned*.out.bam ${name}.bam

echo ${params.manifest} >> software_versions.STAR_SE.txt
STAR --version >> software_versions.STAR_SE.txt
Expand Down
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ params.memory = "32g"
params.inception = false
params.skip_trimming = false
params.star_two_pass_mode = false
params.star_sort_by_coordinate = false
params.additional_args = ""
params.fastp_args = ""

Expand Down