Hot answers tagged

9 votes
Accepted

How to validate that BAMs have been downloaded correctly?

samtools quickcheck is all you need. From the manual: Quickly check that input files appear to be intact. Checks that beginning of the file contains a valid header ...
Devon Ryan's user avatar
  • 19.6k
7 votes
Accepted

How to remove all BAM read groups from all reads (not just the header)?

You might have to manually strip those auxiliary tags off: ...
Devon Ryan's user avatar
  • 19.6k
5 votes
Accepted

Marking optical or PCR duplicates with picard vs. samtools flagstat

There are duplicates, in this line: 1636809 + 0 duplicates, gives 1636809/26595942 = 0.06154356 According to samtools documentation for flagstat: Provides counts for each of 13 categories based ...
StupidWolf's user avatar
  • 1,688
5 votes
Accepted

Estimate insert size for single-end data with picard CollectInsertSizeMetrics

CollectInsertSizeMetrics does not estimate but (as by the name) collects insert size metrics, which is nothing different than parsing the TLEN field from the BAM ...
ATpoint's user avatar
  • 1,137
5 votes
Accepted

What does a question mark ("?") mean in Picard metrics files when I expect a number (integer, float, etc.)

Picard (actually HtsJdk) uses a formatting class (via the MetricsFile class) that emits "?" for NaNs (and Infs). In your case, there seems to be a division-by-zero error during the ...
Yossi Farjoun's user avatar
4 votes

Determining Read Groups

Usually it doesn't actually matter, but if you want it to be very correct: ...
Devon Ryan's user avatar
  • 19.6k
3 votes

GATK CombineVariants complains the contig order in the VCF files

Answered in the GATK forum Try regenerating the index files for your VCFs. Picard SortVcf doesn't do it for you iirc, so when GATK looks at the index files (before opening the VCFs themselves) it ...
Geraldine_VdAuwera's user avatar
3 votes
Accepted

How can I subset a reference based on only the first chromosome?

It sounds like you want samtools faidx foo.fa followed by samtools faidx foo.fa chr1 > your_subset_file.fa (or whatever the ...
Devon Ryan's user avatar
  • 19.6k
2 votes

low-memory high-speed replacement for Picard MarkDuplicates

As you suggested, sambamba is faster at marking duplicates than picard (it's also multithreaded). Recent versions of samtools have a rewritten duplicate marking algorithm, though I doubt it'll be as ...
Devon Ryan's user avatar
  • 19.6k
2 votes
Accepted

GATK CombineVariants complains the contig order in the VCF files

GATK cannot combine VCF files generated by Sniffles, the variant caller that I used to call structural variants (answer from the GATK team).
Biomagician's user avatar
  • 2,459
2 votes

Is there a safe catch-all adapter sequence for trimming?

Alternatively, I really like using bbduk which is part of the BBMap suite. I've processed every nascent sequencing dataset that has been published, and found a lot of quirky errors with older ...
Margaret Gruca's user avatar
2 votes

Is there a safe catch-all adapter sequence for trimming?

You're best off just using fastp or Trim Galore!, both of which will determine the adapter sequence for you. Trim Galore! uses a ...
Devon Ryan's user avatar
  • 19.6k
2 votes

Marking optical or PCR duplicates with picard vs. samtools flagstat

@StupidWolf's answer is correct -- that first number in the flagstat output is what you want to look at to see the number of reads marked as duplicates. I wanted to add that the number given in the ...
Geraldine_VdAuwera's user avatar
2 votes

How does picard's MarkDuplicate handle unmapped reads?

From the Picard documentation: DUPLICATION METRICS: Metrics that are calculated during the process of marking duplicates within a stream of SAMRecords. UNMAPPED_READS The total number of unmapped ...
James Hawley's user avatar
  • 1,384
2 votes
Accepted

Singularity & Picard

Assuming you've pulled the latest broadinstitute/picard container, your first attempt should have produced the expected result: ...
Steve's user avatar
  • 3,079
1 vote

align to the whole hg38 genome, then split bam and collect metrics on each bam issue

This can be done, but you have to split the BAMs while keeping the full header (with the dictionary) in place for all the shards. This can be done with gatk PrintReads. One thing to remember is that ...
Yossi Farjoun's user avatar
1 vote

How to demultiplex a mix of single-indexed and dual-indexed samples

I'm late to the party but simply run cellranger mkfastq twice, with different arguments for the mask and with --filter-dual-index...
plijnzaad's user avatar
  • 111
1 vote

Including Picard tool in galaxy

Picard, like most tools, prints logs to stderr. It should be in the Galaxy history. Are you using a version of picard from the toolshed (if so, which one)? You might set ...
Devon Ryan's user avatar
  • 19.6k
1 vote
Accepted

Picard CollectGcBiasMetrics ignoring certain chromosomes/sequences

The proper solution is to use a different tool (some of this you could do with computeGCBias in deepTools). But since you don't want to do that, you'll have to ...
Devon Ryan's user avatar
  • 19.6k

Only top scored, non community-wiki answers of a minimum length are eligible