Question: Coverage For Fastq Files
0
gravatar for Assa Yeroslaviz
8.2 years ago by
Assa Yeroslaviz1.2k
Munich
Assa Yeroslaviz1.2k wrote:

Hi,

Is there a way of calculating the coverage of a fastq file using the "ShortRead" function coverage?

When doing so I get

> coverage(dilpR1)

Error in function (classes, fdef, mtable) : unable to find an inherited method for function "coverage", for signature "ShortReadQ"

Is there a way of calling it, so that it will work?

Thanks

Assa

short R coverage • 4.3k views
ADD COMMENTlink modified 8.2 years ago by Steve Lianoglou5.0k • written 8.2 years ago by Assa Yeroslaviz1.2k
7

Fastq files must be aligned to a reference genome in order to compute coverage. Otherwise they are merely anonymous sequence without coordinates/context from which to asses coverage.

ADD REPLYlink written 8.2 years ago by Aaronquinlan11k
5
gravatar for Karl
8.2 years ago by
Karl330
USA
Karl330 wrote:

Coverage is defined as the read depth at a location. FastQ files are sequence with quality scores. You can't compute coverage because you dont have read depth or location.

I computed coverage with a tool called coverageBED from BEDTOOLS which takes a set of regions (as a BED file) and a set of (sorted) aligned reads (as SAM or BAM) and counts how many fall onto each region.

No FastQ involved in the process, although you might want to align the fastQ to a reference and obtain a SAM or BAM that way.

ADD COMMENTlink written 8.2 years ago by Karl330

sorry I mixed it with the bam files.

ADD REPLYlink written 8.2 years ago by Assa Yeroslaviz1.2k
2
gravatar for Steve Lianoglou
8.2 years ago by
Steve Lianoglou5.0k
US
Steve Lianoglou5.0k wrote:

In order to calculate coverage with tools available in the bioconductor universe, you will first have to align the reads to the genome.

Given various type of alignment formats, the ShortRead package will be able to load these alignments into your R workspace as an object that should be easy to convert into a GRanges object, or GappedAlignment object, or similar. You can then use coverage on those to get what you're after.

ADD COMMENTlink written 8.2 years ago by Steve Lianoglou5.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 3033 users visited in the last hour