shortReads
1
0
Entering edit mode
Lana Schaffer ★ 1.3k
@lana-schaffer-1056
Last seen 10.3 years ago
Martin, Is there an easy way to write BED files from the filtered readAlign in shortReads? Lana Schaffer Biostatistics/Informatics The Scripps Research Institute DNA Array Core Facility La Jolla, CA 92037 (858) 784-2263 (858) 784-2994 schaffer at scripps.edu
• 745 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States
"Lana Schaffer" <schaffer at="" scripps.edu=""> writes: > Martin, > > Is there an easy way to write BED files from > the filtered readAlign in shortReads? Use the rtracklayer package to create RangedData object 'rd' and then export this to a bed file, e.g., > rd <- RangedData(ranges, scores, space=chr) > export(rd, "tmp.bed") RangedData above has three components, though more are possible. The first is the ranges on which some feature is marked, the second is a (optional) variable (in this case, 'scores') whose value you'd like to display at the corresponding range, and the third is the 'space', (e.g., chromosome), on which you'd like the information to be displayed. For instance library(ShortRead) library(rtracklayer) dirPath <- system.file('extdata', 'maq', package='ShortRead') aln <- readAligned(dirPath, type="MAQMapview") ranges <- IRanges(position(aln), width=width(sread(aln))) scores <- quality(alignQuality(aln)) rd <- RangedData(ranges, scores, space=chromosome(aln)) f <- file.path(tempdir(), "tmp.bed") export(rd, f) rtracklayer also allows interaction with a genome browser directly. I haven't used these facilities extensively so others might have more informed comment. Martin > Lana Schaffer > Biostatistics/Informatics > The Scripps Research Institute > DNA Array Core Facility > La Jolla, CA 92037 > (858) 784-2263 > (858) 784-2994 > schaffer at scripps.edu > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793
ADD COMMENT

Login before adding your answer.

Traffic: 703 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6