Skip to content

Commit

Permalink
correct quote in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
valscherz committed Jul 6, 2020
1 parent d18b701 commit 51641fd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 )

}
2 changes: 1 addition & 1 deletion rules/4_post_processing/scripts/physeq_export.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion rules/4_post_processing/scripts/physeq_melt_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 51641fd

Please sign in to comment.