Questions tagged [bam]

The "Binary Alignment Map" (BAM) format is one of the common binary formats used to store sequence alignment information. Questions should include this tag if they directly pertain to the format itself, details of BAM file usage, or errors relating to likely malformed BAM files.

Filter by
Sorted by
Tagged with
2
votes
1answer
18 views

Targeted hybrid capture bam files showing reads outside target regions in my bed file

Sorry if this is a stupid question I am new to analysing targeted hybrid capture data. I am analysing my HTS data from a targeted hybrid capture enrichment method and subsequent sequencing on a ...
1
vote
0answers
36 views

summarising read group information from a .bam file

I have merged together 2 different .bam files in order to simulate sample contamination. So the reads can come from one of two samples, as shown by the read group info: ...
0
votes
1answer
45 views

Error using htseq-count: Could not retrieve index file

I have a total RNAseq dataset that I aligned using STAR producing BAM files (sorted by coordinates). I am now trying to get counts for the lncRNA sequences using htseq-count, with the command: ...
1
vote
0answers
27 views

BAM file filteing to remain best isoform

I ran HiSat2, MarkDuplicate, removed reads with the lower quality score than 40 and finally only kept properly paired reads. After the BAM filtering steps, I used the Scallop results with TransDecoder....
3
votes
2answers
63 views

Sort reads in BAM file based on presence of specific deletion?

I have an indexed BAM file containing long-read sequencing data and I'd like to split the reads contained within into those with a known deletion and those without the deletion (I have the deletion ...
2
votes
2answers
41 views

Produce .vcf file of ALL mutations in .bam file

I got tasked with a problem, that i thought would be quite simple to solve, but turned out to be quite tricky. Our lab is running targeted mutagenesis experiments in yeast using crispr base editors. ...
0
votes
2answers
42 views

Basic question about finding mRNA sequence in transcriptome

I am a computer scientist just starting out in bioinformatics topics, and would appreciate any guidance that can be given here: I have an mRNA sequence- an isoform - whose length is about 4000 base ...
0
votes
0answers
12 views

How do I find all supplementary mappings of a chimeric long (ONT) read mapped with NGMLR?

Unlike this guy How do I find split reads? I have done a lot of reading before asking this question. I'm aware that the FLAG will tell me if a read is supplementary and the CIGAR has information ...
0
votes
1answer
29 views

How to anonymise a bam file

I have a bam file of, for instance, RNA-Seq, which contains patient-identifiable data in the form of Single Nucleotide Polymorphisms (SNPs) throughout. I would like a technique to take this aligned ...
0
votes
1answer
70 views

How to convert BAM file to bigWig in Python?

I am manipulating some BAM files using pysam package which seems to be very fast and handy. However, I ran into problem when I am trying to generate bigWig files ...
2
votes
1answer
79 views

Is there a tool that can perform a read-group-aware mpileup from a single file?

I would like to perform a samtools mpileup from a single file that contains thousands of read groups with different SM tags. I could split the bam by read group ...
2
votes
1answer
22 views

Phasing problem using “samtools phase”

so I'm having a problem using samtools phase. I'm trying to phase my .bam archives that where generated by aligning my samples with my reference genome. Following the documentation I tried the command:...
3
votes
1answer
28 views

Chromosomal order of supplementary alignment in BAM file “SA” tag

I have several long-read sequences, which when aligned to a human reference genome, aligns to multiple chromosomal fragment as a result of chromothripsis shattering the linear DNA and randomly piecing ...
0
votes
2answers
132 views

Accessing .bam/.cram files from AWS S3?

What's the best/easiest way for accessing .bam/.cram files from S3? I have .bam/.bai .cram/.crai and .bed + .gff files that I want to make available easily to others so they can browse in IGV and ...
4
votes
2answers
217 views

Is there a command line tool to split a SAM/BAM file by CB (cell barcode) tag?

I have a BAM file from a single cell sequencing experiment. Each read has had the cell barcode annotated in the CB tag. Some reads do not have a ...
1
vote
1answer
60 views

plot correlation between several bam files

I have several mab files from medip-seq. they supposed to be replicates and I have to draw their correlation. First I used multiBamSummary from deeptools to merge all the bam files based on bi/bed. ...
1
vote
2answers
102 views

Marking optical or PCR duplicates with picard vs. samtools flagstat

I am trying to identify the best library prep method for noninvasive prenatal test samples, to be sequenced with Illumina Novaseq. One metric that I am evaluating is the number/ percentage of PCR or ...
0
votes
1answer
33 views

HTSeq-count is returning 0 for every gene, instead of expression value

(Ported from stack overflow) I'm trying to summarize gene count using htseq-count; and it's returning 0 counts at every gene. I'm not sure what I'm doing wrong; I think it has to do with the gene ...
1
vote
1answer
53 views

How to filter a SAM file by a bed file?

I have a large BAM file and I want to filter it by just what's defined in a bed file, and write it to a new file. Is it possible to do this with samtools, and if so, how? Is there a better tool I ...
3
votes
1answer
118 views

Index a BAM file using pysam

(How) can you index a BAM file using pysam? When I tried the intuitive pysam.index I got: ...
2
votes
3answers
80 views

Make a fasta out of mapped reads without taking into account the reference

I've aligned reads onto an haploid reference genome. I'd like to have a consensus sequence of all my aligned reads that doesn't take into account the reference genome I used (i.e. I just want the ...
0
votes
0answers
362 views

Using BaseRecalibrator in GATK4

GATK4's BaseRecalibrator uses a list of known variants to adjust the base quality scores in a BAM file. I would like to visualize the pre and post recalibration ...
1
vote
1answer
42 views

samtools / bamUtil | Meaning of <*> as Reference Name

I have been working with several tools on bam files recently and I am not sure how I should interpret some of the outputs. samtools idxstats mapped.sorted.bam <...
1
vote
1answer
102 views

How to obtain file offsets corresponding to range query in block-gzipped file

How can we retrieve the file offsets of the zipped-chunks in a block-gzipped file that contain records for a region/window of interest (e.g. Chr01:100-Chr02:145)? It seems like the CLI of ...
3
votes
1answer
100 views

How to generate two fasta files from samtools phase output?

samtools phase is an easy-to-use tool to phase variants from a bam file and a reference. For a sequence that has two haplotypes, like this: ...
3
votes
1answer
45 views

Tool for calibrating base quality scores?

A given sequencing machine assigns a 'certainty' to each base call in the form of a per-base quality score (FASTQ format). I have reads from several machines aligned to the corresponding reference (...
3
votes
1answer
113 views

pysam or piping samtools view to a python script

Is it faster to use the PySam package to run a python script on a bam for read in samfile.fetch('chr1', 100, 120): print read compared to using a pipe and ...
3
votes
1answer
127 views

How can I export a full alignment from IGV as an image?

The IGV browser lets you export an alignment as an image (File => Save Image). However, this image only contains those reads that fit in the viewing window: As you can see in the image above by ...
0
votes
0answers
24 views

How to visualise /add Arabidopsis T-DNA Lines As Tracks On IGV

We have done some RNA-Seq on Arabidopsis T-DNA lines and mapped the reads on to Arabidopsis genome. Now we wanted to confirm the T-DNA deletion of those lines by loading them on IGV. As a control we ...
2
votes
1answer
202 views

What pitfalls exist with running FastQC on a bam file?

I was analysing a bad sequencing run of some RNA data using FastQC, I supplied it RNA-STAR-aligned bam files (and the human reference). The output of MultiQC had many more "unique reads" in ...
1
vote
2answers
227 views

Extract reads from bam files by their @RG

How could I extract reads from bam files by their read groups @RG ?, I've got one file containing all reads for 5 samples, the SM is appears NONE, So, I want to extract each sample reads by the @RG ...
0
votes
0answers
44 views

How to obtain the extended unaligned bases of the read in reference based genome assembly?

I did illumina read mapping based on a particular gene sequence (reference sequence) using the following command, ...
0
votes
0answers
106 views

multiBamCov for counting reads overlapping a bin interval

I am using multiBamCov from bedtools to count reads in my bed file. I want to count the reads in the specified bins in my bed file such that if the read in the bam file overlap the interval more than ...
0
votes
2answers
60 views

Chromosome information for miRNA

Apologies if this question is previously asked. I have a BAM file alignment to hg19 and miRNA gff3 file from ...
2
votes
2answers
99 views

Hard-clip primers in a bam file

I am working on a sample which was sequenced using an amplicon kit and I would like to ensure that no variants are called in the PCR primer sequences. I know that the primer sequences are part of the ...
2
votes
4answers
590 views

Hosting IGV web on a server

I have my analysis on a cloud server. The data is quite large, so copying it locally is not really an option. I want to be able to host IGV as a server on that server, so that it can access those ...
3
votes
3answers
94 views

Compare multiple alignment results' aligned bases

I have aligned a nanopore data set to a reference genome with graphmap, minimap2 and BLASR. The alignment results are stored in BAM files. I would like to do some concordance assessment, looking at ...
2
votes
1answer
196 views

How to get a MSA fasta from BAM/SAM?

I am working with paired end NGS miseq data from a viral genome with multiple timepoints. I have filtered and trimmed this data for quality and adapter sequences. I have then merged the filtered ...
2
votes
2answers
138 views

How can I transform a mapped BAM file into an unmapped BAM file?

In order to use MergeBamAlignment (Picard), I need an unmapped BAM file and a mapped BAM file. I have two mapped BAM files: one with reads mapped to the reference I want but without metadata such as ...
6
votes
1answer
823 views

Convert BAM to properly paired FASTQ files

I thought I had figured this one out. But apparently not. I need to convert a BAM file of paired-end alignments to two FASTQ files of paired reads to realign them, with a twist: I only want reads ...
2
votes
2answers
1k views

Error while calling bcftools mpileup - Failed to open -: unknown file type

I have sequenced a bacterial genome with a GridIon from ONT. Basically what I want to check is whether or not trimming 50 bps at the beginning of the reads will improve alignment against the reference ...
3
votes
2answers
90 views

Produce a single sequential FASTA sequence out of BAM

I'm having problems properly looking for a solution because I'm a layman in Bioinformatics not familiar with the terminology. I'm hoping you can nudge me in the right direction, please! Thank you very ...
2
votes
2answers
98 views

Error: sort order of reads in BAMs must be the same

I am a novice to bioinformatics trying to run a cuffdiff job in cufflinks and keep getting this error message: Error: sort order of reads in BAMs must be the same ...
1
vote
1answer
376 views

How do you normalise read coverage in a BAM file?

This is a question from the Oxford Nanopore community, from user Michael Radzieta: I have sequenced some plasmids using the rapid barcoding kit, I have attempted to assemble the data using several ...
4
votes
3answers
569 views

How can I calculate coverage at single bases using a bam file?

I'm looking for a way to input a vcf or bed file (with specific base positions) and a bam file, and get the coverage at each base position (ie single base bins) using the bam file. I also want the ...
2
votes
1answer
967 views

How do I find split reads?

How can I detect a split read in a BAM file? Is there any sign in the CIGAR string that describes split read?
2
votes
1answer
238 views

Consensus sequence from SAM or BAM file?

I am trying to perform reference-based assembly. Most of the tutorials teach how to create a bam file and view alignemnts in IGV or Tablet. But, I want a assembled genome sequence in fasta format. How ...
5
votes
2answers
430 views

What does “fetching by region is not available for SAM files” mean?

I am used to gzip/biopython solutions when dealing with sequencing data, but now I wish to switch to more elegant ...
2
votes
2answers
402 views

Access base aligned to particular reference position

The short version: If I have a SAM record, is there any simple way to retrieve the base aligned to a particular reference position without computing a pileup? The long version: I'm using pysam to ...
2
votes
2answers
143 views

Variant calling without matched normal sample

I have WGS .bam files for 3 patients (tumour and its matched derived model namely organoid) but I don't matched normal sample. If I call variants of each patients (tumour and its matched organoid), ...