Entering edit mode
                    yzc706
        
    
        ▴
    
    10
        @yzc706-21224
        Last seen 6.3 years ago
        
    I am trying to make a custom OrgDB ,and have some trouble.
> makeOrgPackage(gene_info = gene_info,
+                go = gene2go,
+                ko = gene2ko,
+                pathway = gene2pathway,
+                maintainer = "*** <***@hotmail.com>",
+                author = "*** <***@hotmail.com>",
+                version = "0.0.1",
+                outputDir = ".",
+                tax_id = tax_id,
+                genus = genus,
+                species = species,
+                goTable = "go")
Populating genes table:
Error in result_bind(res@ptr, params) : 
  NOT NULL constraint failed: genes.GID
In addition: Warning messages:
1: In result_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
2: In result_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
3: In result_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
4: In result_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
the trackback()
> traceback()
15: stop(list(message = "NOT NULL constraint failed: genes.GID", 
        call = result_bind(res@ptr, params), cppstack = list(file = "", 
            line = -1L, stack = "C++ stack not available on this system")))
14: result_bind(res@ptr, params)
13: db_bind(res, as.list(params), ..., allow_named_superset = FALSE)
12: dbBind(rs, params)
11: dbBind(rs, params)
10: .local(conn, statement, ...)
9: dbSendQuery(conn, statement, ...)
8: dbSendQuery(conn, statement, ...)
7: .local(conn, statement, ...)
6: dbGetQuery(con, sql, unclass(unname(geneid)))
5: dbGetQuery(con, sql, unclass(unname(geneid)))
4: .makeGenesTable(genes, con)
3: makeOrgDbFromDataFrames(data, tax_id, genus, species, dbFileName, 
       goTable)
2: .makeOrgPackage(data, version = version, maintainer = maintainer, 
       author = author, outputDir = outputDir, tax_id = tax_id, 
       genus = genus, species = species, goTable = goTable, verbose = verbose)
1: makeOrgPackage(gene_info = gene_info, go = gene2go, ko = gene2ko, 
       pathway = gene2pathway, maintainer = "*** <***@hotmail.com>", 
       author = "*** <***@hotmail.com>", version = "0.0.1", 
       outputDir = ".", tax_id = tax_id, genus = genus, species = species, 
       goTable = "go")
Here are the input dataframes:
> head(gene2go)
# A tibble: 6 x 3
  GID             GO         EVIDENCE
  <chr>           <chr>      <chr>   
1 Chr10T0000100.1 GO:0003674 IEA     
2 Chr10T0000100.1 GO:0003824 IEA     
3 Chr10T0000100.1 GO:0004721 IEA     
4 Chr10T0000100.1 GO:0004722 IEA     
5 Chr10T0000100.1 GO:0005575 IEA     
6 Chr10T0000100.1 GO:0005622 IEA     
> head(gene2ko)
# A tibble: 6 x 2
  GID             Ko    
  <chr>           <chr> 
1 Chr10T0000100.1 K20827
2 Chr10T0000200.1 K13354
3 Chr10T0000300.1 K07760
4 Chr10T0000600.1 K13448
5 Chr10T0000700.1 K22379
6 Chr10T0000900.1 K22379
> head(gene2pathway)
# A tibble: 6 x 2
  GID             Pathway
  <chr>           <chr>  
1 Chr10T0000100.1 ko01009
2 Chr10T0000100.1 ko03021
3 Chr10T0000200.1 ko04146
4 Chr10T0000200.1 ko02000
5 Chr10T0000300.1 ko01001
6 Chr10T0000600.1 ko04626
> head(gene_info)
              GID                                                   GENENAME
1 Chr10T0000100.1 RNA polymerase II subunit B1 CTD phosphatase RPAP2 homolog
2 Chr10T0000200.1                Pentatricopeptide repeat-containing protein
3 Chr10T0000300.1          LRR receptor-like serine threonine-protein kinase
4 Chr10T0000400.1    Belongs to the mitochondrial carrier (TC 2.A.29) family
5 Chr10T0000600.1                                 Belongs to the GRAS family
6 Chr10T0000700.1                                  Bifunctional protein FolD
thank you!

How to deal with gene with multiple GO in gene2go table?