keepStandardChromosomes doesn't respect ordering
2
0
Entering edit mode
@james-w-macdonald-5106
Last seen 8 hours ago
United States

Is this expected?

> gns <- genes(TxDb.Mmusculus.UCSC.mm10.knownGene)
> gns2 <- keepStandardChromosomes(gns)
> seqlevels(gns)
 [1] "chr1"                 "chr2"                 "chr3"                
 [4] "chr4"                 "chr5"                 "chr6"                
 [7] "chr7"                 "chr8"                 "chr9"                
[10] "chr10"                "chr11"                "chr12"               
[13] "chr13"                "chr14"                "chr15"               
[16] "chr16"                "chr17"                "chr18"               
[19] "chr19"                "chrX"                 "chrY"                
[22] "chrM"                 "chr1_GL456210_random" "chr1_GL456211_random"
[25] "chr1_GL456212_random" "chr1_GL456213_random" "chr1_GL456221_random"
[28] "chr4_GL456216_random" "chr4_GL456350_random" "chr4_JH584292_random"
[31] "chr4_JH584293_random" "chr4_JH584294_random" "chr4_JH584295_random"
[34] "chr5_GL456354_random" "chr5_JH584296_random" "chr5_JH584297_random"
[37] "chr5_JH584298_random" "chr5_JH584299_random" "chr7_GL456219_random"
[40] "chrX_GL456233_random" "chrY_JH584300_random" "chrY_JH584301_random"
[43] "chrY_JH584302_random" "chrY_JH584303_random" "chrUn_GL456239"      
[46] "chrUn_GL456359"       "chrUn_GL456360"       "chrUn_GL456366"      
[49] "chrUn_GL456367"       "chrUn_GL456368"       "chrUn_GL456370"      
[52] "chrUn_GL456372"       "chrUn_GL456378"       "chrUn_GL456379"      
[55] "chrUn_GL456381"       "chrUn_GL456382"       "chrUn_GL456383"      
[58] "chrUn_GL456385"       "chrUn_GL456387"       "chrUn_GL456389"      
[61] "chrUn_GL456390"       "chrUn_GL456392"       "chrUn_GL456393"      
[64] "chrUn_GL456394"       "chrUn_GL456396"       "chrUn_JH584304"      
> seqlevels(gns2)
 [1] "chrX"  "chrM"  "chr4"  "chr1"  "chr2"  "chr3"  "chr5"  "chr6"  "chr7"
[10] "chr8"  "chr9"  "chr10" "chr11" "chr12" "chr13" "chr14" "chr15" "chr16"
[19] "chr17" "chr18" "chr19" "chrY"


I expected that the seqlevels for gns2 would retain the ordering of the original GRanges object.

Thanks,

Jim

 

genomeinfodb • 1.6k views
ADD COMMENT
0
Entering edit mode
Sonali Arora ▴ 390
@sonali-arora-6563
Last seen 8.1 years ago
United States

Hi Jim,

which version of GenomeInfoDb are you using ? Please update it using biocLite("GenomeInfoDb")

Your example works for me. 

> library(GenomeInfoDb)

> library(TxDb.Mmusculus.UCSC.mm10.knownGene)

> gns <- genes(TxDb.Mmusculus.UCSC.mm10.knownGene)
> gns2 <- keepStandardChromosomes(gns)
> seqlevels(gns2)
 [1] "chr1"  "chr2"  "chr3"  "chr4"  "chr5"  "chr6"  "chr7"  "chr8"  "chr9"  "chr10" "chr11" "chr12"
[13] "chr13" "chr14" "chr15" "chr16" "chr17" "chr18" "chr19" "chrX"  "chrY"  "chrM"


> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] XVector_0.6.0                            TxDb.Mmusculus.UCSC.mm10.knownGene_3.0.0
 [3] GenomicFeatures_1.18.0                   AnnotationDbi_1.28.0                    
 [5] Biobase_2.26.0                           GenomicRanges_1.18.0                    
 [7] GenomeInfoDb_1.3.4                       IRanges_2.0.0                           
 [9] S4Vectors_0.4.0                          BiocGenerics_0.12.0                     

loaded via a namespace (and not attached):
 [1] base64enc_0.1-2         BatchJobs_1.4           BBmisc_1.7              BiocParallel_1.0.0     
 [5] biomaRt_2.22.0          Biostrings_2.34.0       bitops_1.0-6            brew_1.0-6             
 [9] checkmate_1.4           codetools_0.2-9         DBI_0.3.1               digest_0.6.4           
[13] fail_1.2                foreach_1.4.2           GenomicAlignments_1.2.0 iterators_1.0.7        
[17] RCurl_1.95-4.3          Rsamtools_1.18.0        RSQLite_0.11.4          rtracklayer_1.26.0     
[21] sendmailR_1.2-1         stringr_0.6.2           tools_3.1.1             XML_3.98-1.1           
[25] zlibbioc_1.12.0

Thanks and Regards,

Sonali Arora 

ADD COMMENT
0
Entering edit mode

Hi Sonali,

You are using the latest devel version. I have the latest release version.

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
 [1] grid      parallel  stats4    stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] Gviz_1.10.0                             
 [2] org.Mm.eg.db_3.0.0                      
 [3] RSQLite_0.11.4                          
 [4] DBI_0.3.1                               
 [5] XVector_0.6.0                           
 [6] TxDb.Mmusculus.UCSC.mm10.knownGene_3.0.0
 [7] GenomicFeatures_1.18.1                  
 [8] AnnotationDbi_1.28.0                    
 [9] Biobase_2.26.0                          
[10] BiSeq_1.6.0                             
[11] Formula_1.1-2                           
[12] GenomicRanges_1.18.1                    
[13] GenomeInfoDb_1.2.0                      
[14] IRanges_2.0.0                           
[15] S4Vectors_0.4.0                         
[16] BiocGenerics_0.12.0                    
ADD REPLY
0
Entering edit mode
Sonali Arora ▴ 390
@sonali-arora-6563
Last seen 8.1 years ago
United States

Hi Jim,

We have just added those changes to release version of GenomeInfoDb. You can either use svn and get the latest code from release version branch now or use biocLite() and get it tomorrow. 

Let us know if you have any questions

Thanks,

Sonali. 

ADD COMMENT
0
Entering edit mode
Thanks! On Oct 24, 2014 6:49 PM, "Sonali Arora [bioc]" <noreply@bioconductor.org> wrote: > Activity on a post you are following on support.bioconductor.org > > User Sonali Arora <https: support.bioconductor.org="" u="" 6563=""/> wrote Answer: > keepStandardChromosomes doesn't respect ordering > <https: support.bioconductor.org="" p="" 62268="" #62274="">: > > Hi Jim, > > We have just added those changes to release version of GenomeInfoDb. You > can either use svn and get the latest code from release version branch now > or use biocLite() and get it tomorrow. > > Let us know if you have any questions > > Thanks, > > Sonali. > ------------------------------ > > You may reply via email or visit > A: keepStandardChromosomes doesn't respect ordering >
ADD REPLY

Login before adding your answer.

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