Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WASP mode to STAR as requested by a user #6169

Merged
merged 7 commits into from
Aug 27, 2024
Merged
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
177 changes: 94 additions & 83 deletions tools/rgrnastar/macros.xml

Large diffs are not rendered by default.

32 changes: 21 additions & 11 deletions tools/rgrnastar/rg_rnaStar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@

## Two pass mode
--twopassMode ${twopass.twopassMode} ${twopass.twopass_read_subset}
#for $sj_input in $twopass.sj_precalculated:
'$sj_input'
#end for
#if str($twopass.sj_precalculated).strip():
#for $sj_input in $twopass.sj_precalculated:
'$sj_input'
#end for
#end if
#if str($twopass.twopassMode) != 'None':
#if str($refGenomeSource.GTFconditional.GTFselect) == 'with-gtf':
## need to check first if its a cached index or from history
Expand Down Expand Up @@ -215,7 +217,7 @@
#end if

## Limits
@LIMITS@
@LIMITS@
#else:
## Go with STAR's default algorithmic settings,
## but we need to provide a reasonable default
Expand All @@ -232,12 +234,16 @@
#end if
#end if
#end if

--outBAMsortingThreadN \${GALAXY_SLOTS:-4}
--outBAMsortingBinsN $perf.outBAMsortingBinsN
--winAnchorMultimapNmax $perf.winAnchorMultimapNmax
--limitBAMsortRAM \$((\${GALAXY_MEMORY_MB:-0}*1000000))

#if $oformat.wasp_conditional.waspOutputMode == "wasp_mode":
--waspOutputMode SAMtag
--varVCFfile '$oformat.wasp_conditional.varVCFfile'
#end if

## Handle chimeric options and output
#if str($chimOutType):
--chimOutType $chimOutType
Expand Down Expand Up @@ -408,6 +414,7 @@ with Cufflinks if your sequences come from an unstranded library preparation.">
primary?"/> -->
<param name="outSAMprimaryFlag" type="hidden" value="OneBestScore" />
<expand macro="outSAMmapqUnique"/>
<expand macro="wasp"/>
</section>
<section name="filter" title="Output filter criteria" expanded="true">
<param name="basic_filters" type="select" display="checkboxes" multiple="true" optional="true"
Expand Down Expand Up @@ -565,29 +572,32 @@ with Cufflinks if your sequences come from an unstranded library preparation.">
</data>
<expand macro="outWigOutputs"/>
</outputs>

<tests>
<test expect_num_outputs="3">
<conditional name="singlePaired">
<param name="sPaired" value="single" />
<param name="input1" value="tophat_in2.fastqsanger" ftype="fastqsanger" />
<param name="sPaired" value="paired" />
<param name="input1" value="pbmc_1k_v2_L001.R1.10k.fastq.gz" ftype="fastqsanger.gz" />
<param name="input2" value="pbmc_1k_v2_L001.R2.10k.fastq.gz" ftype="fastqsanger.gz" />
</conditional>
<conditional name="refGenomeSource">
<param name="geneSource" value="history" />
<param name="genomeFastaFiles" value="tophat_test.fa.gz" />
<param name="genomeFastaFiles" value="filtered3.Homo_sapiens.GRCh38.dna.chromosome.21.fa.gz" />
<param name="genomeSAindexNbases" value="5" />
</conditional>
<section name="oformat">
<param name="outSAMattributes" value="NH,HI,AS,nM,NM,MD,jM,jI,MC,ch" />
<conditional name="wasp_conditional">
<param name="waspOutputMode" value="wasp_mode"/>
<param name="varVCFfile" value="filtered3.vcf" ftype="vcf" />
</conditional>
</section>
<section name="algo">
<conditional name="params">
<param name="settingsType" value="default" />
</conditional>
</section>
<output name="output_log" file="rnastar_test.log" compare="re_match_multiline" />
<output name="splice_junctions" file="rnastar_test_splicejunctions.bed"/>
<output name="mapped_reads" file="rnastar_test_mapped_reads.bam" compare="sim_size" delta="634" />
<output name="splice_junctions" file="rnastar_test_splicejunctions_wasp.bed"/>
</test>
<!-- test with cached genome index -->
<test expect_num_outputs="3">
Expand Down
12 changes: 11 additions & 1 deletion tools/rgrnastar/rg_rnaStarSolo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
--soloCBwhitelist None
#end if

#if $solo.wasp_conditional.waspOutputMode == "wasp_mode":
--waspOutputMode SAMtag
--varVCFfile '$solo.wasp_conditional.varVCFfile'
#end if

--soloStrand $solo.soloStrand
--soloFeatures $solo.soloFeatures
--soloUMIdedup $sc.umidedup.soloUMIdedup
Expand Down Expand Up @@ -355,6 +360,7 @@
<option value="GeneFull_Ex50pAS" >Full: Count all reads overlapping genes' exons and introns: prioritize 50% overlap with exons. Do not count reads with 100% exonic overlap in the antisense direction.</option>
<option value="Gene Velocyto">Velocyto: calculate spliced, unspliced, and ambiguous counts per cell per gene similar to the velocyto tool</option>
</param>
<expand macro="wasp"/>
<conditional name="filter" >
<param name="filter_type" type="select" label="Cell filtering type and parameters" >
<option value="cellranger2" selected="true" >Simple filtering of CellRanger v2</option>
Expand Down Expand Up @@ -515,6 +521,10 @@
<param name="soloStrand" value="Forward" />
<param name="soloFeatures" value="Gene" />
<param name="quantModeGene" value="true" />
<conditional name="wasp_conditional">
<param name="waspOutputMode" value="wasp_mode"/>
<param name="varVCFfile" value="filtered3.vcf" ftype="vcf" />
</conditional>
</section>
<output name="output_barcodes" >
<assert_contents>
Expand Down Expand Up @@ -544,7 +554,7 @@
<has_line_matching expression="\s+yesUMIs\s+8" />
</assert_contents>
</output>
<output name="output_BAM" value="filtered3.bam" compare="sim_size" delta="600" />
<output name="output_BAM" value="filtered4.bam" ftype="bam" lines_diff="6"/>
<output name="reads_per_gene" >
<assert_contents>
<has_line_matching expression="ENSG00000279493\s+0\s+0\s+0" />
Expand Down
Loading