Skip to content
Prev 6529 / 21312 Next

[Bioc-devel] [devteam-bioc] A more flexible GenomeInfoDb::mapSeqlevels(): used supported info but don't break with new organisms/toy examples

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'
$species
[1] "Populus trichocarpa"

$style
[1] "JGI2"

## Same style with the higher lvl function
[1] "JGI2"

## Ok, style 'JGI2'

## In more dtail, this matches 'LGI' in NCBI style for this organism
$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
[1] "NCBI"

## Mapping from 'LGI' in 'NCBI' style to 'JGI2' style doesn't work
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')
[1] "T"

## Although a user could find the correct name
circular auto   sex NCBI JGI2.F
1    FALSE TRUE FALSE  LGI      T
[1] ?1.3.3?

Cheers,
Leo

On Wed, Oct 22, 2014 at 7:03 PM, Leonardo Collado Torres
<lcollado at jhu.edu> wrote: