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
1 vote
2 answers
76 views

Discrepancy in Read Counts Between FastQ and BAM Files in Adapter-Trimmed Pipeline

In a FastQ to BAM pipeline where only adapter trimming is performed, I've noticed a potential discrepancy in read counts between the initial FastQ files and their resulting BAM file. Specifically, I'm ...
papabiceps's user avatar
0 votes
0 answers
46 views

Generate simulated bam for certain snps

I want to benchmark my DNA sequencing pipeline. In order to do that I want some gold-standard files in every step(.vcf,.bam,.fastq). I want to generate/simulate a bam file of reads for a given set of ...
Shafayet Rahat's user avatar
3 votes
1 answer
163 views

low mapping percentage in bwa mem

After aligning paired-end reads to a reference genome, I am getting low percentage: ...
Moon's user avatar
  • 103
1 vote
1 answer
128 views

obtaining a fragment data file bed from bam

Im trying to follow this pipeline https://github.com/epifluidlab/cragr on cfDNA WGS. I have bam files from paired end reads aligned with bwa mem. The workflow requires bgzipped and indexed fragment ...
Julieta's user avatar
  • 21
2 votes
1 answer
91 views

How to subsample BAM based on read line number?

Consider a sorted, indexed, only mapped reads containing BAM file. Is there a way to get a sub BAM based on read line numbers? For example get a sub BAM file which contains read line numbers [1, 3, 8, ...
papabiceps's user avatar
1 vote
0 answers
68 views

STACKS ref_map.pl no BAM records

I have 133 aligned and sorted BAM files that I am trying to run through the ref_map.pl script from the STACKS pipeline. My script looks as follows: ...
heather_l's user avatar
1 vote
1 answer
52 views

Check mutation of a gene

Hi all, I am checking if a gene which around 50k base pairs has mutation. So is that a variant from A to G? Would you please tell me how to do so? Thank you so much! The reference sequence from GRCh38,...
Chris's user avatar
  • 101
-1 votes
1 answer
100 views

Gviz Coverage Plots

This question has also been asked on Biostars I have two bam files from single-cell RNA sequencing mapped to the reference genome using CellRanger, I can view them in IGV and I have a particular ...
A4747's user avatar
  • 1
2 votes
0 answers
25 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
  • 181
0 votes
0 answers
45 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
1 vote
1 answer
60 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
  • 645
2 votes
1 answer
270 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
15 votes
5 answers
2k 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
108 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
  • 380
1 vote
1 answer
442 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
97 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
303 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
  • 384
3 votes
2 answers
286 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
271 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
122 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
  • 963
2 votes
1 answer
161 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
846 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
183 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
193 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
6 votes
4 answers
1k 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
  • 283
2 votes
1 answer
208 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
386 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
365 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
134 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
54 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
368 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
405 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
77 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
173 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
969 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,783
4 votes
1 answer
413 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
5k 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
3k 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
66 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
466 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
57 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
  • 149
6 votes
1 answer
691 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
  • 10.1k
0 votes
0 answers
35 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
493 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
284 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
696 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
159 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
63 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
539 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
393 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

1
2 3 4 5