Comments (9)
I've just ran into this very same issue.
It's a pain if the user wants to use alternative tools for sorting (i.e. sambamba
wrapper) in their pipeline (or different versions of samtools
)
from snakemake-wrappers.
Thanks for the input! I guess this is sth. worthy to discuss. At the moment, the bwa-mem
wrapper will output an unsorted bam
file when setting sort="none"
, using samtools view
. I could imagine adding a param to not do this and directly output the resulting sam
file, since I (from my side) would like to avoid a breaking change. This should allow using the wrapper both without any use of samtools
and as before.
Edit: Similar for the other wrappers you mentioned.
from snakemake-wrappers.
Conversion to the optimal format (here BAM, in other cases VCF) should be part of the wrapper, because it comes almost for free, and makes workflows easier to read (hiding an unimportant technical detail). However, I agree that sorting does not need to be part of the BWA wrapper.
It should be possible to deactivate the conversion though, simply by specifying .sam
instead of .bam
as output.
from snakemake-wrappers.
@johanneskoester I agree that sometimes it is nice to hide unimportant technical detail, but isn't that why there are the meta wrappers? I might be missing something here but, as I understand it, the idea would be that main wrappers only do one thing (i.e. they are wrappers to a single tool/command). When it is nice to hide those technical details, then we'd have the meta-wrappers that are exactly that, a wrapper of wrappers.
In this case, I think it would make more sense to have the bwa-mem
wrapper output a sam
file and then have meta-wrappers called (e.g.) meta/bio/bwa/mem/bam
or meta/bio/bwa/mem/sort/samtools
or meta/bio/bwa/mem/sort/picard
.
But I'd be happy just with the possibility of getting a sam
file from bwa-mem
😄
from snakemake-wrappers.
Meta-Wrappers still show as more than one rule in a workflow. However, format conversion is so trivial that I think it in general rather just hampers clarity of a workflow. We do not even need an option for it. Just by specifying a .sam
output file, the wrapper can switch to non-samtools-piping behavior.
In a way, those format conversion functionality just fixes usability issues of the respective tools.
from snakemake-wrappers.
@fgvieira do you want to clean up the bwa wrapper family accordingly in a PR?
from snakemake-wrappers.
Sure, I can change the bwa wrapper family to output sam
if the extension of the output file is .sam
in a PR.
Unless @jafors prefers to do it himself...
from snakemake-wrappers.
I've recently made a PR (#186) with a new combined bwa
sam(pe/se)
wrapper that automatically infers if the input is single-end or paired-end (basically combines bwa sampe
and bwa samse
into a single wrapper).
As an example, I've changed this wrapper so that the output file format is inferred from the output file extension, including when the output is sorted (both by picard
and samtools
). That means that we can get both sam
or bam
files for unsorted, samtools
sorted and picard
sorted.
If everybody agrees, I can do the same for the rest of the bwa
wrapper family...
PS - that PR has a bunch of other wrappers, since I kinda got carried away.. 😄
from snakemake-wrappers.
Issue has been fixed on PR #186
from snakemake-wrappers.
Related Issues (20)
- Sickle se/pe HOT 1
- The ensembl-annotation uses the wrong download URL HOT 3
- Error while testing bbduk HOT 1
- Salmon Quant wrapper throwing segmentation fault HOT 1
- MACS2: support --extsize with fragment size input file
- bwa-memx_index meme wrapper expects specific file name? HOT 3
- Possible bowtie2 align bug HOT 4
- Generic subfolder? HOT 1
- STAR wrapper allowing different output names HOT 3
- CI: autobump workflow never finishes HOT 2
- GFFREAD wrapper produces gff output when fasta file requested HOT 1
- building the docs on a fork doesn't work HOT 2
- FastQC resource allocation not working as expected - get_mem fix? HOT 3
- MultiQC wrapper env issue with imp HOT 1
- Wrappers for Google Batch HOT 3
- ModuleNotFoundError: No module named 'snakemake_wrapper_utils HOT 10
- `bcftools reheader` no longer works with map-style `sample.tsv`
- `bcftools merge`: not able to declare dependency on index files HOT 1
- `deepvariant`: conda environment not installable HOT 3
- change to earlier docs versions on readthedocs HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snakemake-wrappers.