Comments (1)
After staring at various docs and specifications for a while, I convinced myself that maybe we really are redirecting the wrong thing to /dev/null in case of single-end reads. From samtools fastq
help:
Reads are designated READ1 if FLAG READ1 is set and READ2 is not set.
Reads are designated READ2 if FLAG READ1 is not set and READ2 is set.
Reads are designated READ_OTHER if FLAGs READ1 and READ2 are either both set
or both unset.
and more on the flags (samtools flags
):
Flags:
0x1 PAIRED .. paired-end (or multiple-segment) sequencing technology
0x2 PROPER_PAIR .. each segment properly aligned according to the aligner
0x4 UNMAP .. segment unmapped
0x8 MUNMAP .. next segment in the template unmapped
0x10 REVERSE .. SEQ is reverse complemented
0x20 MREVERSE .. SEQ of the next segment in the template is reversed
0x40 READ1 .. the first segment in the template
0x80 READ2 .. the last segment in the template
[...]
plus this excerpt from the SAM/BAM Format Specification:
If 0x1 is unset, no assumptions can be made about 0x2, 0x8, 0x20, 0x40 and 0x80.
together bring me to the conclusion that in case of single-end reads the 0x1 (1) flag is unset and so the reads will not be flagged as either READ1 or READ2. In that case, they would rather be flagged as READ_OTHER and, according to samtools fastq
help, end up in the file indicated with the -0
flag (which we are unfortunately discarding...)
q2-quality-control/q2_quality_control/_filter.py
Lines 134 to 136 in 066fe3d
In fact, when I look at the contents of the bowtie2 output (first step in the filter action) I can see that the SAM flag set there is 4
for every aligned sequence (meaning, they are not marked as READ1/2). If that really is the case, we would just need to replace the -1
flag from the samtools fastq
command in our code with -0
. Given my rather limited experience with samtools though, I may have gotten it wrong, so I'd hope that someone with more XP could qiime in 🙏
from q2-quality-control.
Related Issues (20)
- _blast.py suggestions HOT 1
- test additions
- `evaluate_seqs`: add `max-accepts` parameter
- `evaluate_seqs`: add optional input of `FeatureData[Taxonomy]` for labeling features
- `evaluate_composition`: multiple score plots in viz?
- `evaluate_composition`: fix _validate_metadata_values_are_subset error message
- Add Citations
- convert `evaluate_*` visualizers to pipelines
- `evaluate_composition`: add bray-curtis dissimilarity
- BUG: TAR/TDR values are getting switched
- `evaluate-seqs`: replace histograms with scatterplot of similarity X coverage X abundance
- exclude-seqs vsearch fails to parse with imported fasta HOT 1
- evaluate-composition: R2 values not computing correctly
- Exact sequence start match filter for exlude-seqs HOT 2
- IMP: expose 'strand' argument to `exclude-seqs`
- filter-reads adds too many file extensions
- ENH: add MCC to evaluation metrics
- Hyphens in metadata columns not consistently converted to R dot syntax in decontam-identify
- updates to Decontam functionality in quality control
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 q2-quality-control.