[BioC] Possible bug in `readPositionalInfo` function of 'snapCGH' package?

Zhi-Qiang Ye yezhiqiang at gmail.com
Sun Jan 4 14:04:35 CET 2009


Hello all,

   The function `readPostitionalInfo` of 'snapCGH' package may
contains a bug in this section:

 agilent = {
        split <- strsplit(input$genes$SystematicName, split = ":")
        chr <- start <- end <- vector(length = length(split))
        for (i in 1:length(split)) {
            if (length(split[[i]]) == 1) {
                chr[i] <- start[i] <- end[i] <- NA
            }
            else {
                chr[i] <- substr(split[[i]][1], 4, 5)
                if (chr[i] == "X")
                  chr[i] = 23
                else if (chr[i] == "Y")
                  chr[i] = 24
                temp <- strsplit(split[[i]][2], "-")
                start[i] <- temp[[1]][1]
                end[i] <- temp[[1]][2]
            }
        }
    }

 The purpose of these codes is to extract the positional information
 of probes  from the "SystematicName". The SystematicName of probes
 are like "chr1:12345-45678", then here "chr" should be 1, start
 12345, end 45678. But there are many other forms of SystematicName,
 like:

    1. chrUn:123-456, which will be converted to 'NA' with chr;
    2. chr1_random:123-456, which will be converted to 'NA' with chr;
    3. chr10_random:123-456, which will be converted to '10' with chr;
    4. chrX_random:123-456, chrY_random:123-456 and
chrUn_random:123-456, which will be
    converted to 'NA' with chr;
    5. chrM:123-456 and chrM_random:123-456, which will be converted
    to 'NA' with chr;

Based on these considerations, I think this piece of code needs some
modifications.


Best wishes!


-- 
Zhi-Qiang Ye
Ph.D in Bioinformatics



More information about the Bioconductor mailing list