Hi Leo,

This bug is now fixed .
JGI2 was being incorrectly returned previously.
The correct style is JGI2.F and from now on, it will always check only for JGI2.F

> library(GenomeInfoDb)
> seqlevelsStyle("T")
[1] "JGI2.F"
> seqlevelsStyle("LGI")
[1] "NCBI"
> mapSeqlevels('LGI', 'JGI2.F')
[1] "T"
> packageVersion("GenomeInfoDb")
[1] ‘1.3.4’

Thanks for pointing these out.
Best,
Sonali.


On 10/23/2014 3:35 PM, Leonardo Collado Torres wrote:
Hi,

I just found a tiny bug in .guessSpeciesStyle(). Basically, if the
style name has a dot, this function incorrectly returns the name of
the style.

See below:

## Lets guess the species and style for 'T'
GenomeInfoDb:::.guessSpeciesStyle('T')
$species
[1] "Populus trichocarpa"

$style
[1] "JGI2"

## Same style with the higher lvl function
seqlevelsStyle('T')
[1] "JGI2"

## Ok, style 'JGI2'

## In more dtail, this matches 'LGI' in NCBI style for this organism

GenomeInfoDb:::.supportedSeqnameMappings()["Populus_trichocarpa"]
$Populus_trichocarpa
      NCBI JGI2.F
1     LGI      T
2    LGII      2
3   LGIII      3
4    LGIV      4
5     LGV      5
6    LGVI      6
7   LGVII      7
8  LGVIII      8
9    LGIX      9
10    LGX     10
11   LGXI     11
12  LGXII     12
13 LGXIII     13
14   LGIV     14
15   LGXV     15
16   LGVI     16
17  LGVII     17
18 LGVIII     18
19  LGXIX     19
20   Pltd   <NA>

## Guessing 'LGI' with the higher lvl function works
seqlevelsStyle('LGI')
[1] "NCBI"

## Mapping from 'LGI' in 'NCBI' style to 'JGI2' style doesn't work
mapSeqlevels('LGI', 'JGI2')
Error in mapSeqlevels("LGI", "JGI2") :
   supplied seqname style "JGI2" is not supported

## Using the correct 'style' name works.
## However a user might have expected it to work with 'JGI2' given
## that this was the output from seqlevelsStyle('T')
mapSeqlevels('LGI', 'JGI2.F')
[1] "T"

## Although a user could find the correct name
head(genomeStyles('Populus trichocarpa'), 1)
   circular auto   sex NCBI JGI2.F
1    FALSE TRUE FALSE  LGI      T

packageVersion('GenomeInfoDb')
[1] ‘1.3.3’

Cheers,
Leo



_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to