Questions tagged [sam]

Use this tag for questions specifically related to the text SAM format. For general questions about the SAM/BAM formats use the tag BAM.

Filter by
Sorted by
Tagged with
2 votes
0 answers
13 views

Off-target % for whole-exome sequencing panel

My samples have been sequenced with the Twist Exome 2.0 sequencing panel, and I want to assess how efficient the sequencing has been. By efficient, I mean examining metrics such as the uniformity (...
kane9530's user avatar
  • 171
0 votes
0 answers
12 views

How to export the list of soft-clipped regions from a region of interest in IGV

I want to export the list of soft-clipped regions into a csv file from a region of interest in IGV. Additional information regarding the soft-clipped sequence, coordinate and nucleotide length will be ...
vive's user avatar
  • 1
0 votes
1 answer
43 views

Can bwameth accept unaligned Bam?

Does bwameth accept bam (unaligned) type as input or I will have to convert unaligned bam to fastq (samtools fastq bam) to use ...
aerijman's user avatar
  • 585
2 votes
1 answer
49 views

calculate mismatch frequency/rate from a BAM file

I am working with PAR-CLIP data where experimental procedure induces T to C mismatches. The other types of mismatches we can consider coming from artifact such as PCR errors. It could also be an ...
Ahsan's user avatar
  • 31
13 votes
5 answers
999 views

Good / recommended way to archive fastq and bam files?

We have a lot of Illumina sequenced exome data. Currently we are using spring for its great lossless compression, but we are looking if there is anything better (and most preferably opensource) which ...
Karthik Nair's user avatar
2 votes
1 answer
68 views

Dealing With Manta Limitations

I am trying to figure out a way to remove the limiting factors that Manta says it cannot handle. To quote from the Manta page: The following limitations exist on the input BAM or CRAM files provided ...
Indira's user avatar
  • 189
1 vote
1 answer
134 views

Estimate insert size for single-end data with picard CollectInsertSizeMetrics

I have a BAM file generated from single-end data and I want to estimate the insert size using picard's CollectInsertSizeMetrics as follows: ...
justinian482's user avatar
0 votes
0 answers
64 views

Help sought with GWAS and vcf files, lack phenotype labels

This question has also been asked on Biostars Hi, I am very new to this area, and I am taking a class about bioinformatics. For an independent project assignment, I need to do a GWAS. I am using the ...
user16548's user avatar
1 vote
1 answer
82 views

In CellRanger output, what are the reads with an xf:i:17 tag?

When running CellRanger on 10x scRNA-Seq data, a BAM file is output with the aligned reads. These reads have an xf tag, described here: The bits of this tag are ...
Alexlok's user avatar
  • 277
3 votes
2 answers
96 views

What can be the bias of aligning paired-reads in a single-end mode?

I don't know if I'm in the right place but I have a technical problem to fix. I would have to align paired-end reads from Illumina sequencing to compare a normal genome with a tumor one. When I align ...
cucalorda's user avatar
0 votes
1 answer
173 views

Make mpileup file with several BAM files

I'm new to this business, so my question may seem as dumb. I want to make an mpileup file using a reference sequence and several (two to begin with) aligned sorted BAM files. And I want the output ...
Vasily's user avatar
  • 3
2 votes
1 answer
71 views

need bam file for pilon

I just ran an assembly on yeast genomes using Flye and I want to polish those assemblies with Pilon but it requires a sorted BAM file. How do I make a BAM file of the resulting assembled.fasta?
rimo's user avatar
  • 494
2 votes
1 answer
127 views

Count reads at specific gene features

I have BAM files from an RNA-Seq experiment and for all genes (or a subset) I want to get the number of reads in regions around the TSS (e.g. 2kbp) and the TES (e.g. 2 kbp) and calculate the ratio ...
justinian482's user avatar
2 votes
1 answer
356 views

how to retain reads with low mapping quality (MAPQ) scores when using samtools view -q

I have been using the -q option of samtools view to filter out reads whose mapping quality (MAPQ) scores are below a given ...
Patrick Bastedo's user avatar
1 vote
1 answer
85 views

Aligning scRNA-seq fastq to .bam without cell barcodes

I would like to convert the fastq files from this dataset: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE98679 to .bam files. The group did not provide the scripts they used to to their ...
Angus Campbell's user avatar
2 votes
1 answer
64 views

Get number of reads with a single, (almost) exact match to the full length of a reference sequence

I can't find an answer to this in previous questions, so hoping someone can help me now. We have nanopore sequenced a PCR product, and I've filtered our reads to +/- 10 bp of the expected product ...
Nat R McB's user avatar
5 votes
4 answers
405 views

multi-sequence alignment of samples with multiple contigs each

I want to perform a multi-sequence alignment on 12 samples that clustered based on cgMLST. Ultimate goal is to find out whether they differ by the presence of a few genes. I have performed multi-...
BCArg's user avatar
  • 273
2 votes
1 answer
115 views

Filtering paired-end reads with sambamba: avoid discarding reads on the minus strand

I have a BAM file (DNA, shallow whole genome sequencing at ~1X) where I want to filter reads (using sambamba) to keep only those which have a template length > 20 and mapping quality > 20, ...
Einar's user avatar
  • 131
2 votes
1 answer
185 views

How does split reads look like in sam files?

I used bwa mem to align the DNA with the reference genome. If there are split reads (chimeric reads, come from two different parts of the genome), will it be split into two lines rather than one line?
Wang Ming's user avatar
  • 101
0 votes
1 answer
180 views

Can I use samtools addreplacerg to replace multiple RG entries at the same time?

I have a bam file that contains two @RG lines: ...
Greg Dougherty's user avatar
1 vote
2 answers
96 views

Filter bam with sambamba

I have a very large bam file and I want to filter it to keep only a handfull of positions as defined in a bed file. Can I do this with sambamba or do i need another tool? Thanks
Pablo's user avatar
  • 121
0 votes
2 answers
38 views

BAM files with no RNAME and POS, how to map contents to SNPs?

I have a set of 4 .bam files containing the exome of an individual, around 400 MB each. I used samtools to generate a 2.4 GB .sam file out of one of the .bam files, and I found it contains lines with ...
Fernando D'Andrea's user avatar
2 votes
0 answers
287 views

How to extract reads that map exclusively to a single site with 1 or zero mismatches from BAM files

I generated BAM files (sorted by coordinates) by aligning human RNA reads against the human reference genome using BWA MEM and ...
plicht's user avatar
  • 21
1 vote
1 answer
170 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 ...
Suswagatam Rong's user avatar
1 vote
1 answer
51 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 ...
Adamm's user avatar
  • 206
3 votes
2 answers
126 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, ...
Annelisa's user avatar
1 vote
2 answers
523 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 ...
gc5's user avatar
  • 1,773
4 votes
1 answer
277 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 ...
Scott XU's user avatar
  • 135
2 votes
2 answers
3k 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 ...
Scott XU's user avatar
  • 135
0 votes
1 answer
2k views

How to Sort and Index a SAM file without converting it to BAM?

Generally, I use samtools to sort and index BAM files. Samtools works also with BGZF ...
alec_djinn's user avatar
2 votes
0 answers
37 views

Under what circumstances can the SEQ field in a SAM file be a *?

I saw in the SAM format specifications that the SEQ field (10th column) can be a "*" if the sequence is not stored, instead of being the sequence of the mapped read. Under what circumstances ...
Oakheart's user avatar
0 votes
0 answers
338 views

pysam "Exec format" error

I am a beginner and trying to read a bam file in Python. The lines below throw the error ...
monade's user avatar
  • 11
1 vote
1 answer
54 views

Is there a sam flag for all&none of the reads?

a. Is there a SAM flag that specifies all reads? b. Is there a SAM flag that specifies none of the reads? So that if I run samtools view -f (a) -F (b) the result will be all reads of the file (as if ...
Sam's user avatar
  • 177
6 votes
1 answer
470 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 ...
terdon's user avatar
  • 9,352
0 votes
0 answers
33 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 ...
AWE's user avatar
  • 121
1 vote
2 answers
363 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 ...
Dr. Who's user avatar
  • 21
1 vote
0 answers
148 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 ...
wejt's user avatar
  • 11
1 vote
1 answer
371 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 ...
Justin1609's user avatar
0 votes
0 answers
134 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 ...
Dixi Modi's user avatar
2 votes
1 answer
43 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 ...
Bioreeb's user avatar
  • 21
0 votes
1 answer
365 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 ...
Baran Aldemir's user avatar
1 vote
2 answers
228 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 ...
annabelperry's user avatar
2 votes
1 answer
103 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 ...
annabelperry's user avatar
0 votes
1 answer
77 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 ...
Ni-Ar's user avatar
  • 1
4 votes
4 answers
163 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++....
annabelperry's user avatar
1 vote
2 answers
262 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
591 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 ...
Mereven's user avatar
  • 61
2 votes
1 answer
56 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-...
L R Joshi's user avatar
  • 709
1 vote
1 answer
93 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 ...
Diango's user avatar
  • 151
1 vote
1 answer
271 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 ...
TimD1's user avatar
  • 282

1
2 3 4 5