Giter Site home page Giter Site logo

microfiltr's Introduction

microfiltR: marker gene processing, filtering and exporting functions

accessory functions for processing microbial community data

for a sample workflow, see README.ipynb

The associated manuscript is currently in the pipeline, so feel free to cite however you'd like until then :)

microfiltr's People

Contributors

itsmisterbrown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

microfiltr's Issues

Issues sourcing the function

Hi,

I am getting an error message when I try to source the function using this line of code:

source("/Users/bpb/Documents/GitHub/microfiltR/microfiltR_source_code.R")

Error message:
Error in file(filename, "r", encoding = encoding) :
cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
cannot open file '/Users/bpb/Documents/GitHub/microfiltR/microfiltR_source_code.R': No such file or directory

make.dataset.biom metadata invalid format

Hello

Firstly, thanks for making a very easy use package to move phyloseq objects into the biom format!
Unfortunately, I think I found some bugs when metadata is used

The problem:
I was able to successfully use make.dataset.biom(ps=ps, paths ect, writeFASTA=TRUE, rename=TRUE) to generate the biom v1 table but when i tried to import this file into Qiime2 it couldn't parse the metadata. Looking at the file text itself I found my data had been formatted in the following way:
"columns":[{"id":"S1P1PM","metadata":["Plantation","Mineral","Replicate","Site 1"]}....
where plantation, mineral, replicate and site are variables within specific columns of my physeq metadata

comparing this to the example "rich dense OTU table" within the biom docs, some problems become obvious.
e.g.:
"columns":[
{"id":"Sample1", "metadata":{
"BarcodeSequence":"CGCTTATCGAGA",
"LinkerPrimerSequence":"CATGCTGCCTCCCGTAGGAGT",
"BODY_SITE":"gut",
"Description":"human gut"}},
Firstly the list after metadata should be created with curly braces instead of square braces
Secondly each variable should be predicated by the variable type so that as an example with my data it would look like
"columns":[{"id":"S1P1PM","metadata":{"Location":"Plantation","Layer":"Mineral","Treatment":"Replicate","Site":"Site 1"}}....

Thanks in advance!

taxa_are_rows bug in write.dataset.biom function

the current version (data = as.matrix(t(phyloseq::otu_table(ps)))) can only deal with ps object whose taxa are in column.

should be:

 #generate biom file
 suppressWarnings(ps.b <- biomformat::make_biom(
      if (taxa_are_rows(ps)) {
          data = as.matrix(phyloseq::otu_table(ps))
  } else {
      data = as.matrix(t(phyloseq::otu_table(ps)))
  },

sample_metadata = as.data.frame(phyloseq::sample_data(ps)),
observation_metadata = as.data.frame(phyloseq::tax_table(ps)), 
matrix_element_type = "int"
  )
  )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.