RangedData change space information
1
0
Entering edit mode
@radhouane-aniba-4409
Last seen 7.9 years ago
Hello all, I am using a pachage from Bioconductor TEQC, and when I load my reads as a bam file, the object created (class RangedData) looks like this RangedData with 6 rows and 1 value column across 84 spaces space ranges | ID <factor> <iranges> | <character> 1 1 [8404005, 8404254] | M00897:53:000000000-A4HU0:1:1101:19250:16725 2 1 [8404005, 8404254] | M00897:53:000000000-A4HU0:1:1101:11505:18314 3 1 [8404006, 8404255] | M00897:53:000000000-A4HU0:1:1101:7157:14416 4 1 [8404006, 8404255] | M00897:53:000000000-A4HU0:1:1102:19113:7115 which creates a space column with chr IDs like (1) instead of chr1 I am not familiar with this class yet, so I was wondering how to switch the IDs by appending "chr" on them, because It creates a lot of problems in the plotting part of the analysis My code can be edited here : http://coderscrowd.com/app/codes/view/228 Thank you -- *Radhouane Aniba* *Bioinformatics Scientist* *BC Cancer Agency, Vancouver, Canada* [[alternative HTML version deleted]]
Cancer TEQC Cancer TEQC • 1.2k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States
I tried to edit this into your code on coderscrowd, but it does not seem to respond to me hitting the submit button. The answer is that since RangedData is partially modeled as a list of sequences, one can do this: names(rd) <- paste0("chr", names(rd)) Note that use of RangedData is discouraged for genomic data, because we have GRanges and its neat handling of seqnames, e.g., with GenomeInfoDb, seqlevelsStyle(gr) <- "UCSC" Michael On Thu, Apr 10, 2014 at 11:07 AM, Radhouane Aniba <aradwen@gmail.com> wrote: > Hello all, > > I am using a pachage from Bioconductor TEQC, and when I load my reads as a > bam file, the object created (class RangedData) looks like this > > RangedData with 6 rows and 1 value column across 84 spaces > space ranges | > ID > <factor> <iranges> | > <character> > 1 1 [8404005, 8404254] | > M00897:53:000000000-A4HU0:1:1101:19250:16725 > 2 1 [8404005, 8404254] | > M00897:53:000000000-A4HU0:1:1101:11505:18314 > 3 1 [8404006, 8404255] | > M00897:53:000000000-A4HU0:1:1101:7157:14416 > 4 1 [8404006, 8404255] | > M00897:53:000000000-A4HU0:1:1102:19113:7115 > > which creates a space column with chr IDs like (1) instead of chr1 > I am not familiar with this class yet, so I was wondering how to switch > the IDs by appending "chr" on them, because It creates a lot of problems in > the plotting part of the analysis > > My code can be edited here : > > http://coderscrowd.com/app/codes/view/228 > > Thank you > > > > > -- > *Radhouane Aniba* > *Bioinformatics Scientist* > *BC Cancer Agency, Vancouver, Canada* > > [[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
Thank you Michael, You need just to add a solution to the code (just got a message on coderscrowd for an attempt to solve it) Anyway. The problem is that the package TEQC is using this object, I dont know if it is possible to switch between classes and reinject new classes type like RngedData into built in functions within the same package Rad On Thu, Apr 10, 2014 at 11:31 AM, Michael Lawrence < lawrence.michael@gene.com> wrote: > I tried to edit this into your code on coderscrowd, but it does not seem > to respond to me hitting the submit button. > > The answer is that since RangedData is partially modeled as a list of > sequences, one can do this: > names(rd) <- paste0("chr", names(rd)) > > Note that use of RangedData is discouraged for genomic data, because we > have GRanges and its neat handling of seqnames, e.g., with GenomeInfoDb, > > seqlevelsStyle(gr) <- "UCSC" > > Michael > > > On Thu, Apr 10, 2014 at 11:07 AM, Radhouane Aniba <aradwen@gmail.com>wrote: > >> Hello all, >> >> I am using a pachage from Bioconductor TEQC, and when I load my reads as a >> bam file, the object created (class RangedData) looks like this >> >> RangedData with 6 rows and 1 value column across 84 spaces >> space ranges | >> ID >> <factor> <iranges> | >> <character> >> 1 1 [8404005, 8404254] | >> M00897:53:000000000-A4HU0:1:1101:19250:16725 >> 2 1 [8404005, 8404254] | >> M00897:53:000000000-A4HU0:1:1101:11505:18314 >> 3 1 [8404006, 8404255] | >> M00897:53:000000000-A4HU0:1:1101:7157:14416 >> 4 1 [8404006, 8404255] | >> M00897:53:000000000-A4HU0:1:1102:19113:7115 >> >> which creates a space column with chr IDs like (1) instead of chr1 >> I am not familiar with this class yet, so I was wondering how to switch >> the IDs by appending "chr" on them, because It creates a lot of problems >> in >> the plotting part of the analysis >> >> My code can be edited here : >> >> http://coderscrowd.com/app/codes/view/228 >> >> Thank you >> >> >> >> >> -- >> *Radhouane Aniba* >> *Bioinformatics Scientist* >> *BC Cancer Agency, Vancouver, Canada* >> >> [[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 >> > > -- *Radhouane Aniba* *Bioinformatics Scientist* *BC Cancer Agency, Vancouver, Canada* [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

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