wanjauk / intbt_2020

Training material for H3ABioNet 16S rRNA Microbiome Intermediate Bioinformatics Training 2020
0 stars 0 forks source link

Module6_Coverting_Character_Numeric #3

Open noutin2020 opened 3 years ago

noutin2020 commented 3 years ago

Hi TA, How do you identify the numeric or the factor data first to replace ''Dog''? Find the following output for perusal:

b = super.fitZig.kv(physeq = phy.temp,factor = "Dog",outDir = outDir,FileName =c("1_25FC_0.2_Dog_GvsB_ASVs"),

  • heatmap.descriptor=c("tax_annot"), main=c("Dog G vs. B, merged taxa"), subt=c("subt = FDR < 0.05,|coeff| >= 1.25, >20%+ in either group"),
  • ordered=TRUE, p=0.05, FC = 1.25, perc=0.2, extra.cols = c("Treatment")) [1] "0 of 10 samples were removed due to missing data" Default value being used. Error in super.fitZig.kv(physeq = phy.temp, factor = "Dog", outDir = outDir, : Dog is a character variable, please convert to numeric or factor data first
wanjauk commented 3 years ago

Thanks for raising up this issue @noutin2020. I will look into it and get back to you.

wanjauk commented 3 years ago

Hey @noutin2020, we need to convert the Dog column in the sample metadata into factor data type. Run the following line before running super.fitZig.kv function used to do differential abundance testing:

sample_data(phy.temp)[,"Dog"] <- as.factor(unlist(sample_data(phy.temp)[,"Dog"]))

noutin2020 commented 3 years ago

Hi @wanjauk , thanks for your assistance.