I have certain bam files which have reads of different size. I wish to create another bam file from it which has reads smaller than a certain length N. I should be able to run samtools stats and idxstats like commands on it. Is there a way to do it?
How to retain reads on only an certain size in a bam file?
682 Views Asked by Hrishikesh Hardikar At
1
There are 1 best solutions below
Related Questions in BIOINFORMATICS
- Delete first line of all files in a folder (on ubuntu)
- With every loop iteration in Python use resulting file for subprocess call
- What might explain the [blastall] ERROR: Arguments must start with '-' error?
- In bioinformatics, what is a singleton?
- Coding genotypes from nucleotides to 0/1/2 in R (or Python)
- How to extract short sequence based on step size?
- Find Substring of Trie Keys
- Identify conserved sequences in lists of integers
- How to extract start and end sites based on capital letter in a sequence?
- getting records which are different from two fastq files
- choosing reads with Hamming distance zero
- Bash: Converting 4 columns of text interleaved lines (tab-delimited columns to FASTQ file)
- Unable to read an SBML file in SBMLR
- How to extract coordinates in P-match result?
- Repeated ordered sequence search algorithm
Related Questions in SAMTOOLS
- In bioinformatics, what is a singleton?
- how to ouput sed/samtools result into new directory
- Oscillating processing speed in a python script using pysam.TabixFile to annotate reads
- How to most efficiently retrieve data from NarrowPeak (BED6+4) format files?
- Corrupted sam file from bwa. [W::sam_parse1] mapped query cannot have zero coordinate; treated as unmapped
- I made an error when using metawrap to binning
- Medaka: unrecognized command 'tools' and samtools not found
- Issue Installing Bowtie2 and Samtools on Mac M2
- Cannot sort VCF with bcftools due to invalid input
- I have 2 bash loops with the same structure and only the first works
- How to retain reads on only an certain size in a bam file?
- Piping commands withing GNU parallel (samtools)
- seqff script got trouble after samtools treatment
- How to install Bioinformatics libraries like trimmomatic, bowtie2, samtools, seqtk etc. in AWS linux OS?
- executing samtools in terminal: "command not found", but it is installed
Related Questions in BAM
- Command lines in snakemake
- Running multiple snakemake rules
- Bio::DB::Sam - Get number of mappings for all reads in bam file
- Extract Reads by region from a BAM file
- How do i get and use AlignmentHeader from pysam?
- Looking up and extracting a line from a big file matching the lines of another big file
- Different estimates between bam and gam model (mgcv) and interaction term estimates edf of 0
- How to retain reads on only an certain size in a bam file?
- convert CRAM file to SAM file
- Running DeepVariant on GRCh38 Whole Exome Sequence
- How to use pysam.view() to convert SAM to BAM
- MissingOutputException snakemake
- Bash: Extract reads from BAM files based on read length
- Find sequencing reads with insertions longer than number
- sum elements in python list if match condition
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Use bamutils:
From the docs:
SEE ALSO:
Filtration Of Reads With Length Lower Than 30 From Bam: https://www.biostars.org/p/92889/