5
votes
Accepted
Estimate insert size for single-end data with picard CollectInsertSizeMetrics
CollectInsertSizeMetrics does not estimate but (as by the name) collects insert size metrics, which is nothing different than parsing the TLEN field from the BAM ...
- 393
4
votes
How does split reads look like in sam files?
I'm assuming you mean supplementary/chimeric alignment? The SAM Format Specification has a really detailed explanation as well as its Optional Fields Specification.
In general though, you will have an ...
- 94
3
votes
Accepted
What can be the bias of aligning paired-reads in a single-end mode?
In principle one should simply not align paired-end reads as if they were single end reads, not only because you are not taking advantage of the forward/reverse information contained in the reads, but ...
- 705
3
votes
Accepted
Make mpileup file with several BAM files
Have you tried using samtools mpileup in.bam [in2.bam [...]]? Here's information about the output format from the manual page:
The first three columns give the ...
- 12.8k
3
votes
Accepted
Count reads at specific gene features
First of all, you need gene coordinates. You can retrieve them in GTF format from GENCODE or other sources.
Next, extract TSS and TES +/- 2kb windows from each gene, taking in mind that genes can be ...
- 165
3
votes
Accepted
Reference variant detected as altered one in bam file
The ancestral allele is not always the reference allele. Ref and alt aren't switched, ref is just rare in at least the population you're looking at (it appears to be rare in humans as a whole). So, ...
- 19.4k
2
votes
BAM files with no RNAME and POS, how to map contents to SNPs?
These lines (with no REF or POS) are unmapped reads. If those lines are the entirety of the BAM file, then it is simply another file format to store the raw sequenced reads (as an alternative to FASTQ ...
- 12.8k
2
votes
multi-sequence alignment of samples with multiple contigs each
in the end, I just loaded the .bam files into artemis and, by inspecting the depth (heat-map), I could check which samples had the genes I was looking for:
- 273
2
votes
multi-sequence alignment of samples with multiple contigs each
If you have a reference genome (or are willing to designate one of your de novo assemblies a reference), you may find QUAST helpful.
QUAST will perform an alignment of all genomes against the ...
- 3,399
2
votes
multi-sequence alignment of samples with multiple contigs each
MUMmer4 is a versatile alignment tool for DNA and protein sequences. It supports one reference genome and up to 32 query genomes. MUMmer4 will align every contig in each genome to the reference genome....
- 377
2
votes
Accepted
how to retain reads with low mapping quality (MAPQ) scores when using samtools view -q
Looking at the samtools view docs, I believe that you need to also set the -p flag if you want to retain "filtered" reads in the file and simply have them ...
- 3,399
2
votes
need bam file for pilon
Run a short-read mapper. For example:
bwa index assembled.fasta
bwa mem -pt16 assembled.fasta read1.fq.gz read2.fq.gz \
| samtools sort -m4G -@4 -o align.bam -
- 6,130
2
votes
Accepted
Can I use samtools addreplacerg to replace multiple RG entries at the same time?
Not sure about samtools, but picard AddOrReplaceReadGroups can clear existing read groups and write a new one.
- 205
2
votes
Extracting all reads from bam file which match read IDs in another file
samtools can do this natively too using -N, --qname-file CLI option:
...
- 121
1
vote
Dealing With Manta Limitations
Assuming you have paired-end Illumina reads mapped using BWA or BWA-MEM (with default parameters), these limitations are usually not much of a concern:
Alignments cannot have an unknown read sequence ...
- 2,491
1
vote
What can be the bias of aligning paired-reads in a single-end mode?
I tried to give me this explanation: with single-end alignment of paired-end reads, losing the directionality of the reads and also the expected fragment length, the R2 no longer maps if it maps the ...
- 43
1
vote
Filter bam with sambamba
I think it is possible:
sambamba view --regions regions.bed --with-header --format=bam reads.bam > filtered.bam
- 121
1
vote
Accepted
Aligning scRNA-seq fastq to .bam without cell barcodes
The linked dataset is based on the Smart-seq2 technology. This is a plate-based assay in which individual cells are first sorted into individual wells of a microwell plate via FACS. The cells are then ...
- 36
1
vote
Get number of reads with a single, (almost) exact match to the full length of a reference sequence
Because minimap2 is a minimiser-based mapper, it's less useful for determining mapping accuracy to single-base precision.
Where precision matters, you can use LAST, bearing in mind that it calculates ...
- 12.8k
1
vote
multi-sequence alignment of samples with multiple contigs each
It won't work on more than 3 genomes at a time, but SynMap3D from the Comparative Genomics webserver (https://genomevolution.org/coge/) should do the trick. I'm mentioning it here because the ...
- 755
1
vote
Accepted
Filtering paired-end reads with sambamba: avoid discarding reads on the minus strand
The reason is that sambamba does not use the absolute value of the template length, so, if the read maps so the minus strand, the template length is actually ...
- 131
1
vote
VCF or BAM file for raw data of gene test?
First of all - I would advise you against concluding anything out of your own analysis of the data, you need to consult someone with appropriate training!
Can you get both? The ...
- 5,467
1
vote
Unable to open .bam file in C++ using SeqAn due to 'seqan::UnknownExtensionError'
I think SEQAN_HAS_ZLIB flag not works correctly as it supposed to be.
So you can check the seqan library to see if SEQAN_HAS_ZLIB...
- 11
1
vote
Accessing .bam/.cram files from AWS S3?
I have recently open sourced a Java NIO SPI for S3 that allows direct reads from S3 using Java applications that use the NIO model. This allows applications like GATK and some parts of Picard to ...
- 141
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sam × 221samtools × 69
sequence-alignment × 32
ngs × 18
pysam × 16
fastq × 14
rna-seq × 12
file-formats × 12
reads × 12
python × 11
vcf × 10
variant-calling × 9
read-mapping × 9
fasta × 8
nanopore × 8
bwa × 8
picard × 8
cigar × 8
r × 7
format-conversion × 7
bed × 7
snp × 6
genomics × 6
reference-genome × 6
bedtools × 6