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
34 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 ...
2
votes
1answer
41 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
18 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
0answers
35 views

What pitfalls exist with running FastQC on a bam file?

When trying to figure out what was going on with a bad sequencing run of some RNA data, among other usages of FastQC on earlier files in the analysis, I ran it using RNA-STAR-aligned bam files (human ...
1
vote
1answer
28 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
41 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
44 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
33 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 ...
1
vote
2answers
42 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
3answers
124 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
83 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
0answers
83 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
56 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
293 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
324 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
1answer
60 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
53 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
160 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
166 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
394 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
128 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
335 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
130 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
130 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), ...
3
votes
1answer
343 views

Running htseq-count over BAM files

I am trying to derive an expression matrix from BAM files using htseq-count on the server. These are bulk RNASeq BAM's by the way. I have read the ...
0
votes
0answers
90 views

Permanent error with picard

I am sure I set the path right but whatever I am trying the command not working Any help please? ...
2
votes
3answers
183 views

I have 23andme text files and would like to convert to SAM/BAM format

I would like to convert 23andme text file to NextGen to BAM file for Yfull.com to read. It is difficult to get answers on how to convert to SAM/BAM file for the 23andme text file to be converted to ...
3
votes
1answer
364 views

BAM to gene expression matrix (UMI counts per gene per cell),10X

I am trying to reproduce some results of a scRNASeq experiment. However I am new to the server-side aspect of such analyses and am very confused at the moment. The data provided by the authors of the ...
3
votes
1answer
32 views

Determining Read Groups

Which Read Groups are correct: ...
1
vote
2answers
254 views

Chunk alignment in a name sorted bam for parallel processing

I have a bam file with 1 billion alignment reads of which there are 700 million unique reads. I want to split the alignments into chunks for parallel-processing. Multi-alignments of the same read ...
3
votes
0answers
70 views

convert supplementary reads to primary in sam or bam

I have a problem with a tool, that possibly ignores supplementary reads. I want to find out a bit how this tool works by converting all supplementary reads to primary reads, and then change the names ...
9
votes
1answer
507 views

Why does this human bam file only have one copy of each chromosome?

As we know that in human DNA sequence, one copy of chromosome comes from mother's DNA and another copy comes from father's DNA so as to form two copies of each chromosome in human DNA. So, if we ...
2
votes
2answers
561 views

How to count the number of mapped read in 100-bp window from a BAM/SAM file

Although I know how to get total number of mapped read using samtools flagstat (samtools flagstat file_sorted.bam) but I want to count total number of mapped read ...
2
votes
1answer
2k views

Extracting all reads from bam file which match read IDs in another file

I have a long list of read IDs of interest to me in a file called read_names.txt. it is simply in the format: ...
1
vote
0answers
127 views

bedtools single-nucleotide coverage in BED-specified regions for multiple BAMs

I have a BED6 (BED + name, score, strand info) file that defines some regions of interest. I also have a set of BAMs corresponding to different samples. I would like to obtain output similar to <...
1
vote
3answers
172 views

Is there a read mapper that allows input in SAM format instead of FASTA/FASTQ?

When we get raw sequenced reads in FASTQ format, we usually need to do some pre-processing (QC, demultiplexing, etc.) prior to sequence alignment. The only way to register the results of this ...
4
votes
1answer
48 views

What is “block-compressed” file in samtools?

SAMtools returned an error message for my gzipped genome FASTA: Indexed block-compressed FASTA file cannot be handled The source code for the message is here. ...
3
votes
0answers
216 views

Fastest way to demultiplex bam file based on field

I have a bam file with aligned reads from multiple plates. For each plate I have a portion of the sequence identifier, e.g. HWI-D00310:448:CCG0KANXX:7:1101:2570:1976...
5
votes
3answers
353 views

Total reads aligning to each reference within a bam file

I have two PCR amplicons that have been multiplexed and sequenced using the nanopore minion. I have aligned the fastq reads using minimap2 with a reference file containing both amplicon sequences and ...
0
votes
0answers
29 views

Python module bamtags

Does anyone know this python module, bamtags? I'm using a pipeline (Dovetail Genomics, HiRise) that imports it, but it seems it doesn't exist. It's impossible to install it and there is no ...
1
vote
1answer
45 views

featureCounts segmentation fault on Arch Linux

I am encountering a segmentation fault when attempting to run featureCounts from subread-1.6.3 on even small test data. I installed featureCounts from SourceForge ...
3
votes
1answer
351 views

How do I rewrite a read group using pysam?

I am trying to rewrite a SAM/BAM file with altered read group entries using pysam. In this simplified version, I want to take a BAM, and rewrite the SM tags in all read groups to the same string and ...
6
votes
0answers
167 views

How can I read multiple different regions from a BAM file?

I’m trying to process BAM records (of a coordinate-sorted, indexed BAM file) successively in fixed-size, non-overlapping, sliding genome coordinate windows. Unfortunately I am unable to read records ...
11
votes
1answer
97 views

Can I create a CRAM file with a relative reference path?

I’m trying to create a CRAM file that stores its path to the FASTA reference as a relative path, rather than an absolute path, so that I can move the files around. Unfortunately I can’t get this to ...
2
votes
1answer
125 views

How to force pilon to correct a reference with low coverage mapped reads?

I have mapped some reads to a reference and want to change SNPs in the reference to SNPs found in the reads, even at low coverage. For example, here is a screenshot of one reference in IGV that I ...
2
votes
1answer
354 views

pysam pileup: what reads appear in the pileup?

Cross-posted on Biostars (with no answers currently). I hope that's OK. I thought that iff a read matches the reference at a position, it would appear in the pileup column for that position. But ...
3
votes
1answer
89 views

How to convert files to ADAM format?

I would like to convert BAM and VCF files to ADAM format. How do I do that?
2
votes
1answer
667 views

Disk space error while aligning reads using STAR

Hi am trying to align RNA-seq reads using STAR through following commands, ...
2
votes
0answers
57 views

verifybamid results with freemix < 2% and chipmix > 10%

I ran verifyBAMID on each 200 chip-seq BAM files with input merged vcf file of Genotypes of 600 samples ( 200 of them are chip-seq individuals). I had AF,AC,AN in the info column which was calculated ...
5
votes
1answer
151 views

How to validate that BAMs have been downloaded correctly?

I currently have several hundred BAM files which were downloaded by someone else. These have remained untouched---before working with them, I would like to double-check that these BAMs have been fully ...