read qiime2 metadata (.tsv)
read_q2metadata.Rd
Loads a qiime2 metadata file wherein the 2nd line contains the #q2:types line dictating the type of variable (categorical/numeric)
Examples
fpath <- system.file("extdata/qiime", "sample-metadata.tsv", package = "bubbler")
read_q2metadata(fpath)
#> SampleID barcode-sequence body-site year month day subject
#> 1 L1S8 AGCTGACTAGTC gut 2008 10 28 subject-1
#> 2 L1S57 ACACACTATGGC gut 2009 1 20 subject-1
#> 3 L1S76 ACTACGTGTGGT gut 2009 2 17 subject-1
#> 4 L1S105 AGTGCGATGCGT gut 2009 3 17 subject-1
#> 5 L2S155 ACGATGCGACCA left palm 2009 1 20 subject-1
#> 6 L2S175 AGCTATCCACGA left palm 2009 2 17 subject-1
#> 7 L2S204 ATGCAGCTCAGT left palm 2009 3 17 subject-1
#> 8 L2S222 CACGTGACATGT left palm 2009 4 14 subject-1
#> 9 L3S242 ACAGTTGCGCGA right palm 2008 10 28 subject-1
#> 10 L3S294 CACGACAGGCTA right palm 2009 1 20 subject-1
#> 11 L3S313 AGTGTCACGGTG right palm 2009 2 17 subject-1
#> 12 L3S341 CAAGTGAGAGAG right palm 2009 3 17 subject-1
#> 13 L3S360 CATCGTATCAAC right palm 2009 4 14 subject-1
#> 14 L5S104 CAGTGTCAGGAC tongue 2008 10 28 subject-1
#> 15 L5S155 ATCTTAGACTGC tongue 2009 1 20 subject-1
#> 16 L5S174 CAGACATTGCGT tongue 2009 2 17 subject-1
#> 17 L5S203 CGATGCACCAGA tongue 2009 3 17 subject-1
#> 18 L5S222 CTAGAGACTCTT tongue 2009 4 14 subject-1
#> 19 L1S140 ATGGCAGCTCTA gut 2008 10 28 subject-2
#> 20 L1S208 CTGAGATACGCG gut 2009 1 20 subject-2
#> 21 L1S257 CCGACTGAGATG gut 2009 3 17 subject-2
#> 22 L1S281 CCTCTCGTGATC gut 2009 4 14 subject-2
#> 23 L2S240 CATATCGCAGTT left palm 2008 10 28 subject-2
#> 24 L2S309 CGTGCATTATCA left palm 2009 1 20 subject-2
#> 25 L2S357 CTAACGCAGTCA left palm 2009 3 17 subject-2
#> 26 L2S382 CTCAATGACTCA left palm 2009 4 14 subject-2
#> 27 L3S378 ATCGATCTGTGG right palm 2008 10 28 subject-2
#> 28 L4S63 CTCGTGGAGTAG right palm 2009 1 20 subject-2
#> 29 L4S112 GCGTTACACACA right palm 2009 3 17 subject-2
#> 30 L4S137 GAACTGTATCTC right palm 2009 4 14 subject-2
#> 31 L5S240 CTGGACTCATAG tongue 2008 10 28 subject-2
#> 32 L6S20 GAGGCTCATCAT tongue 2009 1 20 subject-2
#> 33 L6S68 GATACGTCCTGA tongue 2009 3 17 subject-2
#> 34 L6S93 GATTAGCACTCT tongue 2009 4 14 subject-2
#> reported-antibiotic-usage days-since-experiment-start
#> 1 Yes 0
#> 2 No 84
#> 3 No 112
#> 4 No 140
#> 5 No 84
#> 6 No 112
#> 7 No 140
#> 8 No 168
#> 9 Yes 0
#> 10 No 84
#> 11 No 112
#> 12 No 140
#> 13 No 168
#> 14 Yes 0
#> 15 No 84
#> 16 No 112
#> 17 No 140
#> 18 No 168
#> 19 Yes 0
#> 20 No 84
#> 21 No 140
#> 22 No 168
#> 23 Yes 0
#> 24 No 84
#> 25 No 140
#> 26 No 168
#> 27 Yes 0
#> 28 No 84
#> 29 No 140
#> 30 No 168
#> 31 Yes 0
#> 32 No 84
#> 33 No 140
#> 34 No 168