From 51641fd8a6d6caa1fe82f22f3be9a379a73d1466 Mon Sep 17 00:00:00 2001 From: Valentin Date: Mon, 6 Jul 2020 10:13:45 +0200 Subject: [PATCH] correct quote in metadata --- .../r_scripts/importation/create_phyloseq_from_metadata.R | 2 +- rules/4_post_processing/scripts/physeq_export.R | 2 +- rules/4_post_processing/scripts/physeq_melt_table.R | 2 +- .../scripts/transpose_and_add_meta_count_table.R | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ressources/r_scripts/importation/create_phyloseq_from_metadata.R b/ressources/r_scripts/importation/create_phyloseq_from_metadata.R index b2ae24ce..28ad3602 100755 --- a/ressources/r_scripts/importation/create_phyloseq_from_metadata.R +++ b/ressources/r_scripts/importation/create_phyloseq_from_metadata.R @@ -37,6 +37,6 @@ create_phyloseq_fct <- function(physeq_name = "physeq", melted_df_name = "physeq save(physeq_obj, file = "physeq_object") ### Write this table in a tsv file since it is ground for coming analysis and slow to compute - write.table(x = physeq_df, file = "physeq_df.tsv", append = F, quote = F, sep = "\t", eol = "\n", row.names = F, col.names = T ) + write.table(x = physeq_df, file = "physeq_df.tsv", append = F, sep = "\t", eol = "\n", row.names = F, col.names = T ) } \ No newline at end of file diff --git a/rules/4_post_processing/scripts/physeq_export.R b/rules/4_post_processing/scripts/physeq_export.R index 38d100e2..da9d9966 100644 --- a/rules/4_post_processing/scripts/physeq_export.R +++ b/rules/4_post_processing/scripts/physeq_export.R @@ -41,7 +41,7 @@ ape::write.tree(tree, tree_path) metadata <- (sample_data(phyloseq_obj)) metadata$Sample <- rownames(metadata) metadata <- metadata %>% select(Sample, everything()) -write.table(metadata, meta_path , sep="\t", quote=F, row.names = FALSE) +write.table(metadata, meta_path , sep="\t", row.names = FALSE) ## Write the taxonomy table of the phyloseq object taxa_df<- as.data.frame(tax_table(phyloseq_obj), stringsAsFactors = F) diff --git a/rules/4_post_processing/scripts/physeq_melt_table.R b/rules/4_post_processing/scripts/physeq_melt_table.R index 798984d8..e4fcbc6a 100644 --- a/rules/4_post_processing/scripts/physeq_melt_table.R +++ b/rules/4_post_processing/scripts/physeq_melt_table.R @@ -29,4 +29,4 @@ phyloseq_obj <- prune_taxa(taxa_sums(phyloseq_obj) > 0, phyloseq_obj) ## Removes physeq_df <- psmelt(phyloseq_obj) ### Write this table in a tsv format -write.table(x = physeq_df, file = phyloseq_melted_table, append = F, quote = F, sep = "\t", eol = "\n", row.names = F, col.names = T ) +write.table(x = physeq_df, file = phyloseq_melted_table, append = F, sep = "\t", eol = "\n", row.names = F, col.names = T ) diff --git a/rules/4_post_processing/scripts/transpose_and_add_meta_count_table.R b/rules/4_post_processing/scripts/transpose_and_add_meta_count_table.R index 519ddb59..6ef31de6 100644 --- a/rules/4_post_processing/scripts/transpose_and_add_meta_count_table.R +++ b/rules/4_post_processing/scripts/transpose_and_add_meta_count_table.R @@ -20,7 +20,7 @@ ## Load the phyloseq phyloseq_object table <- read.table(count_table, sep = "\t", header = TRUE) - meta <- read.table(meta, sep = "\t", header = TRUE) + meta <- read.table(meta, sep = "\t", header = TRUE, na.strings = "NA") ## Tranpose table table_t <- t(table)