data-raw/generate_example_accessions.R

namesText<-c(
  "1\t|\troot\t|\t\t|\tscientific name\t|",
  "2\t|\tBacteria\t|\tBacteria <prokaryotes>\t|\tscientific name\t|",
  "158878\t|\tStaphylococcus aureus subsp. aureus Mu50\t|\t|\tscientific name\t|",
  "418127\t|\tStaphylococcus aureus subsp. aureus Mu3\t|\t|\tscientific name\t|",
  "426430\t|\tStaphylococcus aureus subsp. aureus str. Newman\t|\t|\tscientific name\t|",
  "158879\t|\tStaphylococcus aureus subsp. aureus N315\t|\t|\tscientific name\t|",
  "273036\t|\tStaphylococcus aureus RF122\t|\t|\tscientific name\t|",
  "523796\t|\tStaphylococcus aureus subsp. aureus ST398\t|\t|\tscientific name\t|",
  "176279\t|\tStaphylococcus epidermidis RP62A\t|\t|\tscientific name\t|",
  "1280\t|\tStaphylococcus aureus\t|\t|\tscientific name\t|",
  "1282\t|\tStaphylococcus epidermidis\t|\t|\tscientific name\t|",
  "1279\t|\tStaphylococcus\t|\t|\tscientific name\t|",
  "90964\t|\tStaphylococcaceae\t|\t|\tscientific name\t|",
  "1385\t|\tBacillales\t|\t|\tscientific name\t|",
  "91061\t|\tBacilli\t|\t|\tscientific name\t|",
  "1239\t|\tBacillota\t|\t|\tscientific name\t|",
  "1783272\t|\tBacillati\t|\t|\tscientific name\t|",
  "130327\t|\tOvine atadenovirus D\t|\t|\tscientific name\t|",
  "100953\t|\tAtadenovirus\t|\t|\tscientific name\t|",
  "10508\t|\tAdenoviridae\t|\t|\tscientific name\t|",
  "2732559\t|\tRowavirales\t|\t|\tscientific name\t|",
  "2732529\t|\tTectiliviricetes\t|\t|\tscientific name\t|",
  "2732008\t|\tPreplasmiviricota\t|\t|\tscientific name\t|",
  "2732005\t|\tBamfordvirae\t|\t|\tscientific name\t|",
  "2732004\t|\tVaridnaviria\t|\t|\tscientific name\t|",
  "10239\t|\tViruses\t|\t|\tscientific name\t|",
  "11234\t|\tMeasles morbillivirus\t|\t|\tscientific name\t|",
  "3052345\t|\tMorbillivirus hominis\t|\t|\tscientific name\t|",
  "11229\t|\tMorbillivirus\t|\t|\tscientific name\t|",
  "2560076\t|\tOrthoparamyxovirinae\t|\t|\tscientific name\t|",
  "11158\t|\tParamyxoviridae\t|\t|\tscientific name\t|",
  "11157\t|\tMononegavirales\t|\t|\tscientific name\t|",
  "2497574\t|\tMonjiviricetes\t|\t|\tscientific name\t|",
  "2497570\t|\tHaploviricotina\t|\t|\tscientific name\t|",
  "2497569\t|\tNegarnaviricota\t|\t|\tscientific name\t|",
  "2732396\t|\tOrthornavirae\t|\t|\tscientific name\t|",
  "2559587\t|\tRiboviria\t|\t|\tscientific name\t|",
  "131567\t|\tcellular organisms\t|\t|\tscientific name\t|",
  "2169575\t|\tBovismacovirus\t|\t|\tscientific name\t|",
  "2169574\t|\tSmacoviridae\t|\t|\tscientific name\t|",
  "2732537\t|\tCremevirales\t|\t|\tscientific name\t|",
  "2732423\t|\tArfiviricetes\t|\t|\tscientific name\t|",
  "2732416\t|\tCressdnaviricota\t|\t|\tscientific name\t|",
  "2732092\t|\tShotokuvirae\t|\t|\tscientific name\t|",
  "2731342\t|\tMonodnaviria\t|\t|\tscientific name\t|",
  "3052462\t|\tOrthoebolavirus zairense\t|\t|\tscientific name\t|",
  "3044781\t|\tOrthoebolavirus\t|\t|\tscientific name\t|",
  "11266\t|\tFiloviridae\t|\t|\tscientific name\t|"
)

nodesText<-c(
  "1\t|\t1\t|\tno rank\t|\t\t|\t8\t|\t0\t|\t1\t|\t0\t|\t0\t|\t0\t|\t0\t|\t0\t|\t\t|",
  "2\t|\t131567\t|\tsuperkingdom\t|\t\t|\t0\t|\t0\t|\t11\t|\t0\t|\t0\t|\t0\t|\t0\t|\t0\t|\t\t|",
  "158878\t|\t1280\t|\tstrain",
  "418127\t|\t1280\t|\tstrain",
  "426430\t|\t1280\t|\tstrain",
  "158879\t|\t1280\t|\tstrain",
  "273036\t|\t1280\t|\tstrain",
  "523796\t|\t1280\t|\tstrain",
  "176279\t|\t1282\t|\tstrain",
  "1280\t|\t1279\t|\tspecies",
  "1282\t|\t1279\t|\tspecies",
  "1279\t|\t90964\t|\tgenus",
  "90964\t|\t1385\t|\tfamily",
  "1385\t|\t91061\t|\torder",
  "91061\t|\t1239\t|\tclass",
  "1239\t|\t1783272\t|\tphylum",
  "1783272\t|\t2\t|\tkingdom",
  "131567\t|\t1\t|\tno rank",
  "130327\t|\t100953\t|\tspecies",
  "100953\t|\t10508\t|\tgenus",
  "10508\t|\t2732559\t|\tfamily",
  "2732559\t|\t2732529\t|\torder",
  "2732529\t|\t2732008\t|\tclass",
  "2732008\t|\t2732005\t|\tphylum",
  "2732005\t|\t2732004\t|\tkingdom",
  "2732004\t|\t10239\t|\tclade",
  "10239\t|\t1\t|\tsuperkingdom",
  "11234\t|\t3052345\t|\tno rank",
  "3052345\t|\t11229\t|\tspecies",
  "11229\t|\t2560076\t|\tgenus",
  "2560076\t|\t11158\t|\tsubfamily",
  "11158\t|\t11157\t|\tfamily",
  "11157\t|\t2497574\t|\torder",
  "2497574\t|\t2497570\t|\tclass",
  "2497570\t|\t2497569\t|\tsubphylum",
  "2497569\t|\t2732396\t|\tphylum",
  "2732396\t|\t2559587\t|\tkingdom",
  "2559587\t|\t10239\t|\tclade",
  "2169575\t|\t2169574\t|\tgenus",
  "2169574\t|\t2732537\t|\tfamily",
  "2732537\t|\t2732423\t|\torder",
  "2732423\t|\t2732416\t|\tclass",
  "2732416\t|\t2732092\t|\tphylum",
  "2732092\t|\t2731342\t|\tkingdom",
  "2731342\t|\t10239\t|\tclade",
  "3052462\t|\t3044781\t|\tspecies",
  "3044781\t|\t11266\t|\tgenus",
  "11266\t|\t11157\t|\tfamily"
)

taxa <- c(
  "NA\taccession\ttaxid\tNA",
  "NA\tNC_007622.1\t273036\tNA",
  "NA\tNC_009782.1\t418127\tNA",
  "NA\tNZ_CTYB01000001.1\t418127\tNA",
  "NA\tNZ_CTYB01000002.1\t418127\tNA",
  "NA\tNZ_CTYB01000003.1\t418127\tNA",
  "NA\tNZ_CTYB01000004.1\t418127\tNA",
  "NA\tNZ_CTYB01000005.1\t418127\tNA",
  "NA\tNZ_CTYB01000006.1\t418127\tNA",
  "NA\tNZ_CTYB01000007.1\t418127\tNA",
  "NA\tNZ_CTYB01000008.1\t418127\tNA",
  "NA\tNZ_CTYB01000009.1\t418127\tNA",
  "NA\tNZ_CTYB01000010.1\t418127\tNA",
  "NA\tNZ_CTYB01000011.1\t418127\tNA",
  "NA\tNZ_CTYB01000012.1\t418127\tNA",
  "NA\tNZ_CTYB01000013.1\t418127\tNA",
  "NA\tNZ_CTYB01000014.1\t418127\tNA",
  "NA\tNZ_CTYB01000015.1\t418127\tNA",
  "NA\tNZ_CTYB01000016.1\t418127\tNA",
  "NA\tNZ_CTYB01000017.1\t418127\tNA",
  "NA\tNZ_CTYB01000018.1\t418127\tNA",
  "NA\tNZ_CTYB01000019.1\t418127\tNA",
  "NA\tNZ_CTYB01000020.1\t418127\tNA",
  "NA\tNZ_CTYB01000021.1\t418127\tNA",
  "NA\tNZ_CTYB01000022.1\t418127\tNA",
  "NA\tNZ_CTYB01000023.1\t418127\tNA",
  "NA\tNZ_CTYB01000024.1\t418127\tNA",
  "NA\tNZ_CTYB01000025.1\t418127\tNA",
  "NA\tNZ_CTYB01000026.1\t418127\tNA",
  "NA\tNZ_CTYB01000027.1\t418127\tNA",
  "NA\tNZ_CTYB01000028.1\t418127\tNA",
  "NA\tNZ_CTYB01000029.1\t418127\tNA",
  "NA\tNZ_CTYB01000030.1\t418127\tNA",
  "NA\tNZ_CTYB01000031.1\t418127\tNA",
  "NA\tNZ_CTYB01000032.1\t418127\tNA",
  "NA\tNZ_CTYB01000033.1\t418127\tNA",
  "NA\tNZ_CTYB01000034.1\t418127\tNA",
  "NA\tNZ_CTYB01000035.1\t418127\tNA",
  "NA\tNZ_CTYB01000037.1\t418127\tNA",
  "NA\tNZ_CTYB01000038.1\t418127\tNA",
  "NA\tNZ_CTYB01000039.1\t418127\tNA",
  "NA\tNZ_CTYB01000040.1\t418127\tNA",
  "NA\tNZ_CTYB01000041.1\t418127\tNA",
  "NA\tNZ_CTYB01000042.1\t418127\tNA",
  "NA\tNZ_CTYB01000043.1\t418127\tNA",
  "NA\tNZ_CTYB01000044.1\t418127\tNA",
  "NA\tNZ_CTYB01000045.1\t418127\tNA",
  "NA\tNZ_CTYB01000047.1\t418127\tNA",
  "NA\tNZ_CTYB01000048.1\t418127\tNA",
  "NA\tNZ_CTYB01000049.1\t418127\tNA",
  "NA\tNZ_CTYB01000051.1\t418127\tNA",
  "NA\tNZ_CTYB01000052.1\t418127\tNA",
  "NA\tNZ_CTYB01000053.1\t418127\tNA",
  "NA\tNZ_CTYB01000054.1\t418127\tNA",
  "NA\tNZ_CTYB01000055.1\t418127\tNA",
  "NA\tNZ_CTYB01000056.1\t418127\tNA",
  "NA\tNZ_CTYB01000057.1\t418127\tNA",
  "NA\tNZ_CTYB01000058.1\t418127\tNA",
  "NA\tNZ_CTYB01000059.1\t418127\tNA",
  "NA\tNZ_CTYB01000060.1\t418127\tNA",
  "NA\tNZ_CTYB01000062.1\t418127\tNA",
  "NA\tNZ_CTYB01000063.1\t418127\tNA",
  "NA\tNZ_CTYB01000065.1\t418127\tNA",
  "NA\tNZ_CTYB01000066.1\t418127\tNA",
  "NA\tNZ_CTYB01000068.1\t418127\tNA",
  "NA\tNZ_CTYB01000069.1\t418127\tNA",
  "NA\tNZ_CTYB01000070.1\t418127\tNA",
  "NA\tNZ_CTYB01000071.1\t418127\tNA",
  "NA\tNZ_CTYB01000075.1\t418127\tNA",
  "NA\tNZ_CTYB01000077.1\t418127\tNA",
  "NA\tNZ_CTYB01000078.1\t418127\tNA",
  "NA\tNZ_CTYB01000079.1\t418127\tNA",
  "NA\tNZ_CTYB01000081.1\t418127\tNA",
  "NA\tNZ_CTYB01000083.1\t418127\tNA",
  "NA\tNZ_CTYB01000085.1\t418127\tNA",
  "NA\tNZ_CTYB01000089.1\t418127\tNA",
  "NA\tNZ_CTYB01000090.1\t418127\tNA",
  "NA\tNZ_CTYB01000096.1\t418127\tNA",
  "NA\tNZ_CTYB01000099.1\t418127\tNA",
  "NA\tNZ_CTYB01000101.1\t418127\tNA",
  "NA\tNZ_CTYB01000110.1\t418127\tNA",
  "NA\tNZ_CTYB01000112.1\t418127\tNA",
  "NA\tNZ_CTYB01000113.1\t418127\tNA",
  "NA\tNZ_CTYB01000114.1\t418127\tNA",
  "NA\tNZ_CTYB01000115.1\t418127\tNA",
  "NA\tNC_002758.2\t158878\tNA",
  "NA\tNC_002745.2\t158878\tNA",
  "NA\tNC_003140.1\t158878\tNA",
  "NA\tNC_017333.1\t523796\tNA",
  "NA\tNC_017334.1\t523796\tNA",
  "NA\tNZ_LAWV01000001.1\t523796\tNA",
  "NA\tNZ_LAWV01000010.1\t523796\tNA",
  "NA\tNZ_LAWV01000011.1\t523796\tNA",
  "NA\tNZ_LAWV01000012.1\t523796\tNA",
  "NA\tNZ_LAWV01000013.1\t523796\tNA",
  "NA\tNZ_LAWV01000014.1\t523796\tNA",
  "NA\tNZ_LAWV01000015.1\t523796\tNA",
  "NA\tNZ_LAWV01000016.1\t523796\tNA",
  "NA\tNZ_LAWV01000017.1\t523796\tNA",
  "NA\tNZ_LAWV01000018.1\t523796\tNA",
  "NA\tNZ_LAWV01000019.1\t523796\tNA",
  "NA\tNZ_LAWV01000002.1\t523796\tNA",
  "NA\tNZ_LAWV01000020.1\t523796\tNA",
  "NA\tNZ_LAWV01000021.1\t523796\tNA",
  "NA\tNZ_LAWV01000022.1\t523796\tNA",
  "NA\tNZ_LAWV01000023.1\t523796\tNA",
  "NA\tNZ_LAWV01000024.1\t523796\tNA",
  "NA\tNZ_LAWV01000025.1\t523796\tNA",
  "NA\tNZ_LAWV01000003.1\t523796\tNA",
  "NA\tNZ_LAWV01000030.1\t523796\tNA",
  "NA\tNZ_LAWV01000004.1\t523796\tNA",
  "NA\tNZ_LAWV01000042.1\t523796\tNA",
  "NA\tNZ_LAWV01000043.1\t523796\tNA",
  "NA\tNZ_LAWV01000005.1\t523796\tNA",
  "NA\tNZ_LAWV01000006.1\t523796\tNA",
  "NA\tNZ_LAWV01000007.1\t523796\tNA",
  "NA\tNZ_LAWV01000008.1\t523796\tNA",
  "NA\tNZ_LAWV01000009.1\t523796\tNA",
  "NA\tNZ_CP021178.1\t523796\tNA",
  "NA\tNC_009641.1\t426430\tNA",
  "NA\tNZ_CP023390.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000001.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000002.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000003.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000004.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000005.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000006.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000007.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000008.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000009.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000010.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000011.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000012.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000013.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000014.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000015.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000016.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000017.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000018.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000020.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000021.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000022.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000028.1\t426430\tNA",
  "NA\tNZ_JBBIAE010000032.1\t426430\tNA"
)

inFile <- tempfile()
writeLines(taxa,inFile)
tmp_accession<- "inst/extdata/example_accessions.sql"
taxonomizr::read.names.sql(textConnection(namesText),tmp_accession, overwrite = TRUE)
taxonomizr::read.nodes.sql(textConnection(nodesText),tmp_accession, overwrite = TRUE)
taxonomizr::read.accession2taxid(inFile,tmp_accession,vocal=TRUE, overwrite = TRUE)
compbiomed/MetaScope documentation built on Jan. 16, 2025, 10:23 p.m.