Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • egorleg
    Junior Member
    • Oct 2010
    • 2

    #1

    GOseq errors

    Hi

    Below is the code I used and the errors returned for the GOseq R package. I would appreciate any suggestions as to how to resolve them.

    Regards

    Bill

    ________________________________________________________

    > library(goseq)
    > de.genes <- scan("DE_genes.txt", what=character() )
    Read 2744 items
    > all.genes <- scan("all_genes.txt", what=character() )
    Read 35180 items
    > genes = as.integer(all.genes %in% de.genes)
    > names(genes) = all.genes
    > pwf = nullp(genes, "mm9", "ensGene")
    Loading mm9 length data...
    > mapping=read.table("innatedb.in",header=TRUE,sep="\t")
    > innatedb=split(mapping$Pathway,mapping$ID)
    > pathways=goseq(genes,pwf,gene2cat=innatedb)
    Using manually entered categories.
    Error in summary(map)[, 1] : incorrect number of dimensions

    > head(pathways, n = 50)
    Error in head(pathways, n = 50) : object 'pathways' not found
    > enriched.pathways = pathways$category[pathways$upval < 0.01]
    Error: object 'pathways' not found
    > enriched.pathways
    Error: object 'enriched.pathways' not found
  • colinm
    Junior Member
    • May 2011
    • 1

    #2
    I ran into the same problem using manual annotations. If you look in the code, the goseq function restricts the list gene2cat to names that are present in the rownames of the data.frame kicked out by nullp. If you don't add the names of the data used to generate the list to the rownames of the data.frame, it chokes in the 'reversemapping' function because it is dealing with a null list. This fixed the problem for me:

    N = nullp(DEgenes = DETECTED_VECTOR,bias.data=LENGTHS_VECTOR)
    rownames(N) <- names(LENGTHS_VECTOR) ##this is what fixes it
    go = goseq(N,gene2cat=GENES_TO_CAT_LIST,method='Wallenius')

    Obviously you'll have to tailor it a bit to your situation, but I hope that helps.

    -Colin

    Comment

    • crh
      Member
      • Dec 2009
      • 46

      #3
      Hi,

      I'm running into the same problem I think.

      > sessionInfo()
      R version 2.12.2 (2011-02-25)
      Platform: i386-apple-darwin9.8.0/i386 (32-bit)

      other attached packages:
      [1] goseq_1.2.0 geneLenDataBase_0.99.5 BiasedUrn_1.03


      Here's a snippet of my code:

      > all <- read.delim("qd_de_gene_size_down_only.txt",header=T,stringsAsFactors=FALSE)
      > head(all)
      gene CDS DE
      1 au5.g1.t1 927 0
      2 au5.g10.t1 795 0

      >
      > #list of assayed genes
      > assayed.genes<-all$gene
      > head(assayed.genes)
      [1] "au5.g1.t1" "au5.g10.t1" "au5.g100.t1" "au5.g1000.t1"
      [5] "au5.g10000.t1" "au5.g10001.t1"
      > is.vector(assayed.genes)
      [1] TRUE
      >
      > #read gene lengths (CDS)
      > gene.length<-all$CDS
      > head(gene.length)
      [1] 927 795 1941 2317 207 4239
      > is.vector(gene.length)
      [1] TRUE
      >
      > #list of DE genes (0|1) caution: use UP_ONLY file for goseq, or DOWN_only
      > de.genes<-all$DE
      > head(de.genes)
      [1] 0 0 0 0 0 0
      > is.vector(de.genes)
      [1] TRUE
      >
      >
      > #gene vector
      > gene.vector<-as.integer(de.genes)
      > names(gene.vector)<-assayed.genes
      >
      > #KEGG annotations data frame
      > #au5.g10000_t1 520259 Ribosome
      > go<-read.delim("../ids_kegg_map_associations.txt",header=FALSE,stringsAsFactors=FALSE)
      > head(go)
      V1 V2 V3
      1 au5.g10000_t1 520259 map03010
      2 au5.g10001_t1 520260 map00480

      > go.terms=data.frame(go$V1,go$V3)
      > head(go.terms)
      go.V1 go.V3
      1 au5.g10000_t1 map03010
      2 au5.g10001_t1 map00480
      3 au5.g10002_t1 <NA>
      4 au5.g10003_t1 <NA>
      5 au5.g10004_t1 <NA>
      6 au5.g10005_t1 <NA>
      > is.data.frame(go.terms)
      [1] TRUE

      > pwf=nullp(gene.vector,bias.data=gene.length)
      >
      > stats=goseq(pwf,gene2cat=go.terms,method='Wallenius')#good for R 2.12
      Using manually entered categories.
      Error in summary(map)[, 1] : incorrect number of dimensions
      In addition: Warning message:
      In goseq(pwf, gene2cat = go.terms, method = "Wallenius") :
      Gene column could not be identified in gene2cat conclusively, using the one headed go.V1
      >


      If I construct

      rownames(pwf) <- names(gene.length) ##this is what fixes it

      I get the same error:

      > pwf=nullp(gene.vector,bias.data=gene.length)
      > rownames(pwf) <- names(gene.length) ##this is what fixes it
      > stats=goseq(pwf,gene2cat=go.terms,method='Wallenius')#good for R 2.12
      Using manually entered categories.
      Error in summary(map)[, 1] : incorrect number of dimensions
      Calls: goseq -> reversemapping
      In addition: Warning message:
      In goseq(pwf, gene2cat = go.terms, method = "Wallenius") :
      Gene column could not be identified in gene2cat conclusively, using the one headed go.V1
      Execution halted


      Any suggestions welcomed - I'm missing something simple I suspect.

      Charles

      Comment

      • crh
        Member
        • Dec 2009
        • 46

        #4
        I found the problem - different formatting of IDs imported:

        all: au5.g1.t1

        go.terms:au5.g1_t1


        dope!

        Charles

        Comment

        • tedtoal
          Junior Member
          • Dec 2011
          • 3

          #5
          Error in summary(map)[, 1] : incorrect number of dimensions

          Examples in the goseq pdf file dated 1 April 2010 show goseq() being called with the first argument "genes" and second argument "pwf". This is wrong. The "genes" argument is not used with goseq(). Its first argument is "pwf".
          See ?goseq

          Comment

          • melis
            Junior Member
            • Nov 2011
            • 6

            #6
            Hi all,
            I am also having the same problem. My ID format is the same but still I get the same error when I run this.

            > stats=goseq(pwf,gene2cat=go.terms,method='Wallenius')
            Using manually entered categories.
            Error in summary(map)[, 1] : incorrect number of dimensions
            In addition: Warning message:
            In goseq(pwf, gene2cat = go.terms, method = "Wallenius") :
            Gene column could not be identified in gene2cat conclusively, using the one headed go.ID

            Does anyone know the source of the error? What is "dimensions" mentioned in the message?

            Thanks!
            Melis

            Comment

            • upendra_35
              Senior Member
              • Apr 2010
              • 102

              #7
              Originally posted by tedtoal View Post
              Examples in the goseq pdf file dated 1 April 2010 show goseq() being called with the first argument "genes" and second argument "pwf". This is wrong. The "genes" argument is not used with goseq(). Its first argument is "pwf".
              See ?goseq
              Thanks for the hint. I got into the same problem as everyone above and your hint helped me to fix it. Thanks

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                by SEQadmin2



                Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                ...
                10-14-2026, 09:55 AM
              • SEQadmin2
                New Genomics Technologies Take Aim at Long-Standing Limits
                by SEQadmin2


                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                ...
                09-28-2026, 10:25 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 10-15-2026, 10:52 AM
              0 responses
              22 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-14-2026, 05:39 AM
              0 responses
              27 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-13-2026, 09:56 AM
              0 responses
              22 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-09-2026, 11:14 AM
              0 responses
              28 views
              0 reactions
              Last Post SEQadmin2  
              Working...