htSeqTools - naming RangedData objects?
1
0
Entering edit mode
Ian D. ▴ 70
@ian-donaldson-4761
Last seen 10 hours ago
United Kingdom
I am trying to get htSeqTools to create a PCA for my ChIP-seq sample reads. However, by default there are no labels associated with the sample points in my PCA plot. METHOD: I created RangedData objects like this, e.g: RR05 <- readAligned(dirPath , "RR_20111013_filtered_RR05_bfast_hg18_a3 _best_unique_sorted_mapped.bam", type='BAM') RR05ranges <- RangedData(ranges=IRanges(position(RR05),position(RR05)+width(RR05)), space=chromosome(RR05), strand=strand(RR05)) I have assigned my RangedData to a list like this: samples <- RangedDataList(RR05ranges,RR06ranges,RR2_03ranges,RR2_04ranges) Can i assign names like this? names(samples) <- c("RR05","RR06","RR2_03", "RR2_04") It works, but my worry is that the order might be different if objects do not have a fixed order..... Or is there a way of assigning a name to each RangedData object before they are added to a list? Thank you! As you can tell i am no expert at using R/Bioconductor! Ian [[alternative HTML version deleted]]
htSeqTools ASSIGN htSeqTools ASSIGN • 1.4k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States
On Tue, Jan 17, 2012 at 8:22 AM, Ian Donaldson < Ian.Donaldson@manchester.ac.uk> wrote: > I am trying to get htSeqTools to create a PCA for my ChIP-seq sample > reads. However, by default there are no labels associated with the sample > points in my PCA plot. > > METHOD: > I created RangedData objects like this, e.g: > RR05 <- readAligned(dirPath , > "RR_20111013_filtered_RR05_bfast_hg18_a3_best_unique_sorted_mapped.b am", > type='BAM') > > RR05ranges <- > RangedData(ranges=IRanges(position(RR05),position(RR05)+width(RR05)), > space=chromosome(RR05), strand=strand(RR05)) > > I have assigned my RangedData to a list like this: > samples <- RangedDataList(RR05ranges,RR06ranges,RR2_03ranges,RR2_04ranges) > > Can i assign names like this? > names(samples) <- c("RR05","RR06","RR2_03", "RR2_04") > > Yes. > It works, but my worry is that the order might be different if objects do > not have a fixed order..... > > The objects do have a fixed order, and the names will be kept in sync. > Or is there a way of assigning a name to each RangedData object before > they are added to a list? > > You can always name the arguments to the RangedDataList function, like RangedDataList(A = rd_a, B = rd_b). > Thank you! As you can tell i am no expert at using R/Bioconductor! > > I might also point you towards the use of readGappedAlignments in GenomicRanges. A GappedAlignments can be coerced to a GRanges with grlist() and then on to RangedData via as(). You could put the GRanges in a GenomicRangesList in the same way as RangedDataList; however, htSeqTools might not work with that. Ian > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
A brief note, htSeqTools does provide methods for GRanges objects. Best, David -----Original Message----- From: Michael Lawrence <lawrence.michael@gene.com> Date: Tue, 17 Jan 2012 09:44:45 To: Ian Donaldson<ian.donaldson@manchester.ac.uk> Cc: bioconductor@r-project.org<bioconductor@r-project.org>; David Rossell<david.rossell@irbbarcelona.org> Subject: Re: [BioC] htSeqTools - naming RangedData objects? On Tue, Jan 17, 2012 at 8:22 AM, Ian Donaldson < Ian.Donaldson@manchester.ac.uk> wrote: > I am trying to get htSeqTools to create a PCA for my ChIP-seq sample > reads. However, by default there are no labels associated with the sample > points in my PCA plot. > > METHOD: > I created RangedData objects like this, e.g: > RR05 <- readAligned(dirPath , > "RR_20111013_filtered_RR05_bfast_hg18_a3_best_unique_sorted_mapped.b am", > type='BAM') > > RR05ranges <- > RangedData(ranges=IRanges(position(RR05),position(RR05)+width(RR05)), > space=chromosome(RR05), strand=strand(RR05)) > > I have assigned my RangedData to a list like this: > samples <- RangedDataList(RR05ranges,RR06ranges,RR2_03ranges,RR2_04ranges) > > Can i assign names like this? > names(samples) <- c("RR05","RR06","RR2_03", "RR2_04") > > Yes. > It works, but my worry is that the order might be different if objects do > not have a fixed order..... > > The objects do have a fixed order, and the names will be kept in sync. > Or is there a way of assigning a name to each RangedData object before > they are added to a list? > > You can always name the arguments to the RangedDataList function, like RangedDataList(A = rd_a, B = rd_b). > Thank you! As you can tell i am no expert at using R/Bioconductor! > > I might also point you towards the use of readGappedAlignments in GenomicRanges. A GappedAlignments can be coerced to a GRanges with grlist() and then on to RangedData via as(). You could put the GRanges in a GenomicRangesList in the same way as RangedDataList; however, htSeqTools might not work with that. Ian > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 599 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