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
0 votes
1 answer
22 views

VCF or BAM file for raw data of gene test?

My friend has a VUS (Polymicrogyria with or without VEDS) mutation that was found in her whole-exome sequencing with respect to the phenotype given that time. At present, her doctors have more ...
user avatar
0 votes
1 answer
25 views

Reference variant detected as altered one in bam file

I received (from manufacturer) several .bam files and I used four callers (samtools, freebayes, haplotypecaller, deepvariant) to find some sequence variants. In obtained .vcf files, I took a closer ...
user avatar
  • 162
3 votes
2 answers
50 views

Detect mutation context in a read of a sam file

After sequencing (Illumina) of some DNA, I generated a sam file through alignment of a fastq file (using Bowtie2). Instead of using variant calling programs, I want to know the specific variances, ...
user avatar
1 vote
2 answers
87 views

Potential side effects of replacing read group tags in BAM file

I have a set of BAM files where the read group tags have some (default?) values, i.e.: @RG ID:RG0 LB:LB0 PU:PU0 SM:SM0 This creates issues in my downstream ...
user avatar
  • 1,713
4 votes
1 answer
96 views

samtools view command not found error

When I tried to use samtools to split a bam file based on different chromosomes, I used this command: samtools view input.bam -b chr21 | chr21.bam However, I get ...
user avatar
  • 135
0 votes
0 answers
20 views

Use Htslib to create auxilary tags in bam file C++

I am creating a threaded c++ file where i generate in silico bam files, using header, DNA sequence and read information. First i use bam_init1() to create the bam1_t structure just named "b"....
user avatar
2 votes
2 answers
154 views

How to convert a BAM file into a VCF file

I know that there is a lot of methods to do so, but most of them need to have a reference file. (For example, the GATK force me to provide a reference.) However, I think the BAM file I am working with ...
user avatar
  • 135
0 votes
0 answers
7 views

Access fragment length data for protected genomics data fragmentomics Deep Learning model

Problem: access to BAM or BED files of popular cfDNA WGS studies BAM files contain identifying genetic information and are restricted in availability BED files are easily created from BAM files but ...
user avatar
0 votes
0 answers
134 views

pysam "Exec format" error

I am a beginner and trying to read a bam file in Python. The lines below throw the error ...
user avatar
  • 11
6 votes
1 answer
237 views

Why do SAM and BAM use different coordinate systems?

BAM files are, at least as far as I know, simply binary compressed versions of SAM files. They have the exact same information and are used in the same way. Why then does the SAM format use a 1-based ...
user avatar
  • 7,957
0 votes
0 answers
31 views

Fastest way to count where two bam files are homozygote reference (inverted variant calling)

Maybe I'm having a brain-freeze so excuse me if this is a waste of everyone's time... I am working with an organism with ~700Mb genome. I have bam files of two individuals that are whole genome ...
user avatar
  • 121
1 vote
2 answers
99 views

How to extract all sequences mapped to a transcript from Kallisto output

This question has also been asked on Biostars I ran Kallisto with the --pseudobam option. How do I extract all the short reads that are mapped to a single transcript (e.g. ENST00000367969.8)? As a ...
user avatar
  • 21
1 vote
0 answers
75 views

Extract read names and the associated nucleotides on specific positions from a BAM file (in R)

Let's assume I have a BAM file and several positions that I would like to examine more closely in this alignment. My goal is to find out whether these positions are on the same reads and which ...
user avatar
  • 11
1 vote
1 answer
124 views

How to convert multiple single-end bam files to fastq using samtools

Hi I am trying to convert bam files generated from Ion Torrent Proton sequencing to fastq format so that I can upload them to ...
user avatar
0 votes
0 answers
85 views

Splitting .bam files into separate samples for tophat2

I have RNA seq data of 12 samples (paired end, so 24 files) and I ran tophat2 for alignment on all of them which gave me one bam file for all the samples. Now I need separate bam files for all the ...
user avatar
2 votes
1 answer
32 views

Counting the co-occurrence of variants A and B in an aligned sequencing read

I need some help getting started on this project. To simplify we want to be able to quantify the occurrence of 3 variants on each sequencing read in an alignment file as a proxy measurement for ...
user avatar
  • 21
0 votes
1 answer
100 views

Is it normal to have a smaller bam file after merging bam files?

I have 2 bam files that belong to the same sample and I merged them with samtools merge. And after merging, I realized that the merged version is a bit smaller than ...
user avatar
1 vote
2 answers
119 views

Can HTSlib extract bam reads occurring in a specific region without iterating through the whole file?

I am using htslib/sam.h to write a C++ program. As part of this program, I must extract reads occurring on specific scaffolds in specific regions from a bam file. Essentially, I want to perform the ...
user avatar
2 votes
1 answer
46 views

How do I access sequence and MAPQ from bam using HTSlib in C++?

I am using the "htslib/sam.h" header in C++. I need to access the SEQ field of bam reads and store each sequence in a vector of strings. I also need to access the MAPQ field of each read to ...
user avatar
0 votes
1 answer
41 views

Impact of merging ChIP-seq runs of the same sample on PCR duplicates identification?

I'd like to a follow up question to this question related to merging fastq files for ChIP-seq. Let's assume we have one sample library that is re-sequenced two or three times in order to achieve a ...
user avatar
  • 1
3 votes
3 answers
95 views

Unable to open .bam file in C++ using SeqAn due to 'seqan::UnknownExtensionError'

I am trying to open .bam files in C++ to extract reads occurring at specific scaffolds and loci. I essentially want to call "samtools view sample.bam -o sample.sam scaffold:pos-pos" from C++....
user avatar
1 vote
2 answers
155 views

How to convert CRAM file with 10x data in three fastq files

10x Genomics data are stored in three FASTQ files, besides the standard R1 and R2 reads, there is also a I1 file with some metadata. Sometimes however they are shipped in a single bam/cram file (e.g. ...
6 votes
1 answer
272 views

Is there an efficient way to extract CIGAR strings for read pairs from bam files with python?

I am working with bam files and I have to check if reads of a specific position or their mates are soft clipped. So, I am looking for a fast way to extract the read pairs from a bam file in python. So ...
user avatar
  • 61
2 votes
1 answer
49 views

Detecting SARS-CoV-2 variants from the mixed virus population

I have a fastq file from Nanopore sequencing data that contains reads from both the UK and South Africa variants of SARS-CoV-2. The variants are identified by three key mutations in the receptor-...
user avatar
  • 709
0 votes
1 answer
53 views

RNA_Seq data aligned used uniquely or multi mapped reads impact on result interpretation

I have some transcriptomic (Whole) sequencing data that I should analyse. I would like to do raw data alignment to a reference genome taking into account the multi mapped reads and uniquely mapped ...
user avatar
  • 121
1 vote
1 answer
129 views

What does presence/absence of black lines mean in IGV?

IGV (Integrated Genome Viewer) is a popular open-source tool for viewing alignment files. In my BAM file in IGV, some deletions have black lines running through them, and others don't. What causes ...
user avatar
  • 240
3 votes
1 answer
410 views

Inflate operation failed: progress temporarily not possible, or in() / out() returned an error

I download a BAM file from ftp-trace.ncbi.nlm.nih.gov:/giab/ftp/data/NA12878/10Xgenomics_ChromiumGenome_LongRanger2.0_06202016/NA12878_GRCh38.bam (171G), and I am trying to view the comparison result ...
user avatar
  • 31
3 votes
1 answer
113 views

How to check what software has been used to generate bam file?

I have several bam files from unknown origin. I'd like to know what software was used to obtain those bam files, e.g. bwa-mem. Is it possible to somehow check it?
user avatar
  • 162
1 vote
1 answer
135 views

genotyping or variant calling in R

Are there any good options for calling variants or even just a pileup from R? R is not ideal for this, but I'd like to integrate with other functions. I found deepSNV::bam2R which roughly does what I ...
user avatar
  • 2,099
1 vote
0 answers
49 views

Proper scatter/gather of bam files

I'm trying to do some calculus in parallel with BAM files. For that, I need to split the input bam file in chunks, process them in parallel and join them at the end. But I'm facing a read duplication ...
user avatar
  • 221
0 votes
1 answer
273 views

extract chimeric and multimap reads from bam file

I am trying to extract all chimeric and multi-map reads from either SAM/BAM file. Is there any simple command to do that? Can I use htslib for parsing sam/bam files ...
user avatar
  • 195
1 vote
0 answers
63 views

How to rename Read Groups

I periodically run into problems with Read Groups. I am in a desperate need for a tool that would allow me to fix them. This time, when I was mapping reads, I formatted all the information in the Read ...
user avatar
  • 5,287
1 vote
1 answer
65 views

How to extract reads with INDELs > a given size?

I'm trying to modify this https://www.biostars.org/p/253774/ To get reads with deletions > 20bp I think this gives reads with exactly 20bp dels: ...
user avatar
2 votes
1 answer
908 views

How to generate a consensus sequence from a multi-reference BAM file?

I am trying to generate a consensus sequence from a BAM file that was generated by mapping reads to a reference FASTA containing multiple sequences. Usually, I generate consensus sequences from BAM ...
user avatar
0 votes
1 answer
86 views

Nvidia Parabrick fq2bam pipeline error - No such file or directory

I am trying to implement Nvidia-parabrick fq2bam pipeline to process my WES dataset. The reason for opting this pipeline is the huge number of samples (1004) which take many months to process for ...
user avatar
1 vote
1 answer
326 views

Is there a straightforward way to get mismatches/indels in a BAM file using pysam?

Ideally, I'd like to do something like the following: ...
user avatar
  • 880
0 votes
1 answer
158 views

Moving UMI from tag into read name

I have a bam file with Unique Molecular Identifiers (UMIs) for each read present on the RX tag ( such as RX:Z:TGAGAAGGG), as expected by picard and fgbio tools. ...
user avatar
  • 121
0 votes
1 answer
53 views

Is it possible to convert BAM file from one genome assembly to the other?

I Have multiple BAM files that are referenced to UCSC genome assembly GRCh37/hg19 that are read in different time frames. Now, I am planning a different studies that require assembling all the data ...
user avatar
0 votes
1 answer
34 views

How to identify to each scaffold a read belongs to, inside a .sam file?

I have a fasta file assembly and combining it with the raw reads we produced a .bam file which I converted to .sam . The .sam information lines look like this: ...
user avatar
0 votes
1 answer
76 views

Get list of urls of GSM data set of a GSE set

I have this GSE dataset ( GSE104279 ) (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE104279). I want to make a table with set IDs and ftp urls to use it as a table in galaxy.org I know that we ...
user avatar
1 vote
1 answer
305 views

Add tags to the read pairs in a bam file

I have a bam file from paired-end sequencing, in which each R1 has the RX tag assigned (via UMItools group) denoting a Unique ...
user avatar
  • 121
2 votes
1 answer
31 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 ...
user avatar
0 votes
0 answers
66 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: ...
user avatar
  • 1,208
0 votes
1 answer
2k 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: ...
user avatar
1 vote
0 answers
31 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....
user avatar
3 votes
2 answers
109 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 ...
user avatar
  • 33
2 votes
2 answers
200 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. ...
user avatar
0 votes
2 answers
48 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 ...
user avatar
0 votes
1 answer
101 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 ...
user avatar
  • 121
2 votes
2 answers
331 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 ...
user avatar