Skip to content

Commit

Permalink
Define the STAR output as bam file
Browse files Browse the repository at this point in the history
  • Loading branch information
LKress committed Jul 22, 2024
1 parent ccbdb3e commit fa9af26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
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
4 changes: 3 additions & 1 deletion 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 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

0 comments on commit fa9af26

Please sign in to comment.