rdrr-io / rdrr-issues

rdrr.io issues
34 stars 7 forks source link

error for get_vennlist() cannot return list #111

Closed sitifatimah294 closed 1 year ago

sitifatimah294 commented 1 year ago

Hello,

I have a phyloseq dataset as below:

phyloseq-class experiment-level object otu_table() OTU Table: [ 685 taxa and 434 samples ] sample_data() Sample Data: [ 434 samples by 23 sample variables ] tax_table() Taxonomy Table: [ 685 taxa by 7 taxonomic ranks ]

the phyloseq structure is as below: Formal class 'phyloseq' [package "phyloseq"] with 5 slots ..@ otu_table:Formal class 'otu_table' [package "phyloseq"] with 2 slots .. .. ..@ .Data : num [1:685, 1:434] 17.282 1.873 1.222 0 0.356 ... .. .. .. ..- attr(, "dimnames")=List of 2 .. .. .. .. ..$ : chr [1:685] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ... .. .. .. .. ..$ : chr [1:434] "SAMD00115015" "SAMD00115025" "SAMD00115027" "SAMD00114971" ... .. .. ..@ taxa_are_rows: logi TRUE .. .. ..$ dim : int [1:2] 685 434 .. .. ..$ dimnames:List of 2 .. .. .. ..$ : chr [1:685] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ... .. .. .. ..$ : chr [1:434] "SAMD00115015" "SAMD00115025" "SAMD00115027" "SAMD00114971" ... ..@ tax_table:Formal class 'taxonomyTable' [package "phyloseq"] with 1 slot .. .. ..@ .Data: chr [1:685, 1:7] "Bacteria" "Bacteria" "Bacteria" "Bacteria" ... .. .. .. ..- attr(, "dimnames")=List of 2 .. .. .. .. ..$ : chr [1:685] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ... .. .. .. .. ..$ : chr [1:7] "Kingdom" "Phylum" "Class" "Order" ... .. .. ..$ dim : int [1:2] 685 7 .. .. ..$ dimnames:List of 2 .. .. .. ..$ : chr [1:685] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ... .. .. .. ..$ : chr [1:7] "Kingdom" "Phylum" "Class" "Order" ... ..@ sam_data :'data.frame': 434 obs. of 23 variables: Formal class 'sample_data' [package "phyloseq"] with 4 slots .. .. ..@ .Data :List of 23 .. .. .. ..$ : chr [1:434] "YachidaS_2019" "YachidaS_2019" "YachidaS_2019" "YachidaS_2019" ... .. .. .. ..$ : chr [1:434] "sub_10023" "sub_10025" "sub_10029" "sub_10031" ... .. .. .. ..$ : chr [1:434] "stool" "stool" "stool" "stool" ... .. .. .. ..$ : chr [1:434] "control" "control" "control" "control" ... .. .. .. ..$ : chr [1:434] "healthy" "healthy" "healthy" "healthy" ... .. .. .. ..$ : int [1:434] 65 40 67 77 64 66 66 66 65 77 ... .. .. .. ..$ : chr [1:434] "adult" "adult" "senior" "senior" ... .. .. .. ..$ : chr [1:434] "male" "male" "female" "male" ... .. .. .. ..$ : chr [1:434] "JPN" "JPN" "JPN" "JPN" ... .. .. .. ..$ : chr [1:434] "no" "no" "no" "no" ... .. .. .. ..$ : chr [1:434] "IlluminaHiSeq" "IlluminaHiSeq" "IlluminaHiSeq" "IlluminaHiSeq" ... .. .. .. ..$ : chr [1:434] "31171880" "31171880" "31171880" "31171880" ... .. .. .. ..$ : int [1:434] 53354508 44355082 51664530 41373138 58630590 56880756 53721284 14386194 59909810 53530490 ... .. .. .. ..$ : num [1:434] 7.53e+09 6.50e+09 7.53e+09 5.90e+09 8.21e+09 ... .. .. .. ..$ : int [1:434] 50 50 50 50 50 50 50 50 50 50 ... .. .. .. ..$ : int [1:434] 150 150 150 150 150 150 150 150 150 150 ... .. .. .. ..$ : chr [1:434] "Paolo_Manghi" "Paolo_Manghi" "Paolo_Manghi" "Paolo_Manghi" ... .. .. .. ..$ : num [1:434] 26.6 25 20.2 24.5 21.2 ... .. .. .. ..$ : chr [1:434] NA NA NA NA ... .. .. .. ..$ : chr [1:434] "control" "control" "control" "control" ... .. .. .. ..$ : num [1:434] 660 400 0 300 0 0 8 0 930 0 ... .. .. .. ..$ : num [1:434] 0 993 0 813 0 ... .. .. .. ..$ : chr [1:434] "Non-CRC" "Non-CRC" "Non-CRC" "Non-CRC" ... .. .. ..@ names : chr [1:23] "study_name" "subject_id" "body_site" "study_condition" ... .. .. ..@ row.names: chr [1:434] "SAMD00115015" "SAMD00115025" "SAMD00115027" "SAMD00114971" ... .. .. ..@ .S3Class : chr "data.frame" ..@ phy_tree : NULL ..@ refseq : NULL

I wish to generate a venn diagram list using get_vennlist() in order to create a venn diagram.. the problem is, it works perfectly for any other variables within the sample data of this phyloseq data, and also my other sets of phyloseq data (different samples). But for this particular set.. it is unable to generate the list.

For instance here: my data is from Japan.. I would like to generate the venn diagram to differentiate the no of taxa within these condition; 1.study condition (Cancer and control), error here 2.stages (different stages of cancer and control). works fine

Below are the command and results:

  1. study condition:

listvd_JPN_study_condition <- get_vennlist(ps_comb_Japan, factorNames = "study_condition") lengths(listvd_JPN_study_condition) control CRC [1,] 1 1 [2,] 1 1 [3,] 1 1 [4,] 1 1 [5,] 1 1 [6,] 1 1 [7,] 1 1 [8,] 1 1 [9,] 1 1 [10,] 1 1 [11,] 1 1 [12,] 1 1 [13,] 1 1 [14,] 1 1 [15,] 1 1 [16,] 1 1 [17,] 1 1 [18,] 1 1 [19,] 1 1 [20,] 1 1 [21,] 1 1 [22,] 1 1 [23,] 1 1 [24,] 1 1 [25,] 1 1 [26,] 1 1 [27,] 1 1 [28,] 1 1 [29,] 1 1 [30,] 1 1 [31,] 1 1 [32,] 1 1 [33,] 1 1 [34,] 1 1 [35,] 1 1 [36,] 1 1 [37,] 1 1 [38,] 1 1 [39,] 1 1 [40,] 1 1 [41,] 1 1 [42,] 1 1 [43,] 1 1 [44,] 1 1 [45,] 1 1 [46,] 1 1 [47,] 1 1 [48,] 1 1 [49,] 1 1 [50,] 1 1 [51,] 1 1 [52,] 1 1 [53,] 1 1 [54,] 1 1 [55,] 1 1 [56,] 1 1 [57,] 1 1 [58,] 1 1 [59,] 1 1 [60,] 1 1 [61,] 1 1 [62,] 1 1 [63,] 1 1 [64,] 1 1 [65,] 1 1 [66,] 1 1 [67,] 1 1 [68,] 1 1 [69,] 1 1 [70,] 1 1 [71,] 1 1 [72,] 1 1 [73,] 1 1 [74,] 1 1 [75,] 1 1 [76,] 1 1 [77,] 1 1 [78,] 1 1 [79,] 1 1 [80,] 1 1 [81,] 1 1 [82,] 1 1 [83,] 1 1 [84,] 1 1 [85,] 1 1 [86,] 1 1 [87,] 1 1 [88,] 1 1 [89,] 1 1 [90,] 1 1 [91,] 1 1 [92,] 1 1 [93,] 1 1 [94,] 1 1 [95,] 1 1 [96,] 1 1 [97,] 1 1 [98,] 1 1 [99,] 1 1 [100,] 1 1 [101,] 1 1 [102,] 1 1 [103,] 1 1 [104,] 1 1 [105,] 1 1 [106,] 1 1 [107,] 1 1 [108,] 1 1 [109,] 1 1 [110,] 1 1 [111,] 1 1 [112,] 1 1 [113,] 1 1 [114,] 1 1 [115,] 1 1 [116,] 1 1 [117,] 1 1 [118,] 1 1 [119,] 1 1 [120,] 1 1 [121,] 1 1 [122,] 1 1 [123,] 1 1 [124,] 1 1 [125,] 1 1 [126,] 1 1 [127,] 1 1 [128,] 1 1 [129,] 1 1 [130,] 1 1 [131,] 1 1 [132,] 1 1 [133,] 1 1 [134,] 1 1 [135,] 1 1 [136,] 1 1 [137,] 1 1 [138,] 1 1 [139,] 1 1 [140,] 1 1 [141,] 1 1 [142,] 1 1 [143,] 1 1 [144,] 1 1 [145,] 1 1 [146,] 1 1 [147,] 1 1 [148,] 1 1 [149,] 1 1 [150,] 1 1 [151,] 1 1 [152,] 1 1 [153,] 1 1 [154,] 1 1 [155,] 1 1 [156,] 1 1 [157,] 1 1 [158,] 1 1 [159,] 1 1 [160,] 1 1 [161,] 1 1 [162,] 1 1 [163,] 1 1 [164,] 1 1 [165,] 1 1 [166,] 1 1 [167,] 1 1 [168,] 1 1 [169,] 1 1 [170,] 1 1 [171,] 1 1 [172,] 1 1 [173,] 1 1 [174,] 1 1 [175,] 1 1 [176,] 1 1 [177,] 1 1 [178,] 1 1 [179,] 1 1 [180,] 1 1 [181,] 1 1 [182,] 1 1 [183,] 1 1 [184,] 1 1 [185,] 1 1 [186,] 1 1 [187,] 1 1 [188,] 1 1 [189,] 1 1 [190,] 1 1 [191,] 1 1 [192,] 1 1 [193,] 1 1 [194,] 1 1 [195,] 1 1 [196,] 1 1 [197,] 1 1 [198,] 1 1 [199,] 1 1 [200,] 1 1 [201,] 1 1 [202,] 1 1 [203,] 1 1 [204,] 1 1 [205,] 1 1 [206,] 1 1 [207,] 1 1 [208,] 1 1 [209,] 1 1 [210,] 1 1 [211,] 1 1 [212,] 1 1 [213,] 1 1 [214,] 1 1 [215,] 1 1 [216,] 1 1 [217,] 1 1 [218,] 1 1 [219,] 1 1 [220,] 1 1 [221,] 1 1 [222,] 1 1 [223,] 1 1 [224,] 1 1 [225,] 1 1 [226,] 1 1 [227,] 1 1 [228,] 1 1 [229,] 1 1 [230,] 1 1 [231,] 1 1 [232,] 1 1 [233,] 1 1 [234,] 1 1 [235,] 1 1 [236,] 1 1 [237,] 1 1 [238,] 1 1 [239,] 1 1 [240,] 1 1 [241,] 1 1 [242,] 1 1 [243,] 1 1 [244,] 1 1 [245,] 1 1 [246,] 1 1 [247,] 1 1 [248,] 1 1 [249,] 1 1 [250,] 1 1 [251,] 1 1 [252,] 1 1 [253,] 1 1 [254,] 1 1 [255,] 1 1 [256,] 1 1 [257,] 1 1 [258,] 1 1 [259,] 1 1 [260,] 1 1 [261,] 1 1 [262,] 1 1 [263,] 1 1 [264,] 1 1 [265,] 1 1 [266,] 1 1 [267,] 1 1 [268,] 1 1 [269,] 1 1 [270,] 1 1 [271,] 1 1 [272,] 1 1 [273,] 1 1 [274,] 1 1 [275,] 1 1 [276,] 1 1 [277,] 1 1 [278,] 1 1 [279,] 1 1 [280,] 1 1 [281,] 1 1 [282,] 1 1 [283,] 1 1 [284,] 1 1 [285,] 1 1 [286,] 1 1 [287,] 1 1 [288,] 1 1 [289,] 1 1 [290,] 1 1 [291,] 1 1 [292,] 1 1 [293,] 1 1 [294,] 1 1 [295,] 1 1 [296,] 1 1 [297,] 1 1 [298,] 1 1 [299,] 1 1 [300,] 1 1 [301,] 1 1 [302,] 1 1 [303,] 1 1 [304,] 1 1 [305,] 1 1 [306,] 1 1 [307,] 1 1 [308,] 1 1 [309,] 1 1 [310,] 1 1 [311,] 1 1 [312,] 1 1 [313,] 1 1 [314,] 1 1 [315,] 1 1 [316,] 1 1 [317,] 1 1 [318,] 1 1 [319,] 1 1 [320,] 1 1 [321,] 1 1 [322,] 1 1 [323,] 1 1 [324,] 1 1 [325,] 1 1 [326,] 1 1 [327,] 1 1 [328,] 1 1 [329,] 1 1 [330,] 1 1 [331,] 1 1 [332,] 1 1 [333,] 1 1 [334,] 1 1 [335,] 1 1 [336,] 1 1 [337,] 1 1 [338,] 1 1 [339,] 1 1 [340,] 1 1 [341,] 1 1 [342,] 1 1 [343,] 1 1 [344,] 1 1 [345,] 1 1 [346,] 1 1 [347,] 1 1 [348,] 1 1 [349,] 1 1 [350,] 1 1 [351,] 1 1 [352,] 1 1 [353,] 1 1 [354,] 1 1 [355,] 1 1 [356,] 1 1 [357,] 1 1 [358,] 1 1 [359,] 1 1 [360,] 1 1 [361,] 1 1 [362,] 1 1 [363,] 1 1 [364,] 1 1 [365,] 1 1 [366,] 1 1 [367,] 1 1 [368,] 1 1 [369,] 1 1 [370,] 1 1 [371,] 1 1 [372,] 1 1 [373,] 1 1 [374,] 1 1 [375,] 1 1 [376,] 1 1 [377,] 1 1 [378,] 1 1 [379,] 1 1 [380,] 1 1 [381,] 1 1 [382,] 1 1 [383,] 1 1 [384,] 1 1 [385,] 1 1 [386,] 1 1 [387,] 1 1 [388,] 1 1 [389,] 1 1 [390,] 1 1 [391,] 1 1 [392,] 1 1 [393,] 1 1 [394,] 1 1 [395,] 1 1 [396,] 1 1 [397,] 1 1 [398,] 1 1 [399,] 1 1 [400,] 1 1 [401,] 1 1 [402,] 1 1 [403,] 1 1 [404,] 1 1 [405,] 1 1 [406,] 1 1 [407,] 1 1 [408,] 1 1 [409,] 1 1 [410,] 1 1 [411,] 1 1 [412,] 1 1 [413,] 1 1 [414,] 1 1 [415,] 1 1 [416,] 1 1 [417,] 1 1 [418,] 1 1 [419,] 1 1 [420,] 1 1 [421,] 1 1 [422,] 1 1 [423,] 1 1 [424,] 1 1 [425,] 1 1 [426,] 1 1 [427,] 1 1 [428,] 1 1 [429,] 1 1 [430,] 1 1 [431,] 1 1 [432,] 1 1 [433,] 1 1 [434,] 1 1 [435,] 1 1 [436,] 1 1 [437,] 1 1 [438,] 1 1 [439,] 1 1 [440,] 1 1 [441,] 1 1 [442,] 1 1 [443,] 1 1 [444,] 1 1 [445,] 1 1 [446,] 1 1 [447,] 1 1 [448,] 1 1 [449,] 1 1 [450,] 1 1 [451,] 1 1 [452,] 1 1 [453,] 1 1 [454,] 1 1 [455,] 1 1 [456,] 1 1 [457,] 1 1 [458,] 1 1 [459,] 1 1 [460,] 1 1 [461,] 1 1 [462,] 1 1 [463,] 1 1 [464,] 1 1 [465,] 1 1 [466,] 1 1 [467,] 1 1 [468,] 1 1 [469,] 1 1 [470,] 1 1 [471,] 1 1 [472,] 1 1 [473,] 1 1 [474,] 1 1 [475,] 1 1 [476,] 1 1 [477,] 1 1 [478,] 1 1 [479,] 1 1 [480,] 1 1 [481,] 1 1 [482,] 1 1 [483,] 1 1 [484,] 1 1 [485,] 1 1 [486,] 1 1 [487,] 1 1 [488,] 1 1 [489,] 1 1 [490,] 1 1 [491,] 1 1 [492,] 1 1 [493,] 1 1 [494,] 1 1 [495,] 1 1 [496,] 1 1 [497,] 1 1 [498,] 1 1 [499,] 1 1 [500,] 1 1 [ reached getOption("max.print") -- omitted 104 rows ] str(listvd_JPN_study_condition) chr [1:604, 1:2] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ...

  • attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:2] "control" "CRC"
  1. stages:

listvd_JPN_stages <- get_vennlist(ps_comb_Japan, factorNames = "stages") lengths(listvd_JPN_stages) ES LS Non-CRC 546 495 604

str(listvd_JPN_stages) List of 3 $ ES : chr [1:546] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ... $ LS : chr [1:495] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ... $ Non-CRC: chr [1:604] "Bacteroides_plebeius" "Bacteroides_dorei" "Faecalibacterium_prausnitzii" "Eubacterium_eligens" ...

I want to get results like no.2 (stages) for no.1. But repeatedly failed. I tried reconstructing the dataset again but then again failed. can someone help me or maybe point out anything that I missed? thank you.

ihowson commented 1 year ago

Thanks for getting in touch!

This issue tracker is just for website issues. We're not able to provide technical support for individual packages. Sorry!