Skip to content

Instantly share code, notes, and snippets.

View khemlalnirmalkar's full-sized avatar
:shipit:
I may be slow to respond.

Khemlal Nirmalkar khemlalnirmalkar

:shipit:
I may be slow to respond.
View GitHub Profile
@khemlalnirmalkar
khemlalnirmalkar / metaphlanToPhyloseq.R
Created February 5, 2022 00:29 — forked from lwaldron/metaphlanToPhyloseq.R
Import a table of MetaPhlAn taxonomic abundances into phyloseq
metaphlanToPhyloseq <- function(
metaphlandir,
metadat=NULL,
simplify=TRUE){
## tax is a matrix or data.frame with the table of taxonomic abundances, rows are taxa, columns are samples
## metadat is an optional data.frame of specimen metadata, rows are samples, columns are variables
## if simplify=TRUE, use only the most detailed level of taxa names in the final object
## metaphlanToPhyloseq("~/Downloads/metaphlan_bugs_list")
.getMetaphlanTree <- function(removeGCF=TRUE, simplify=TRUE){
if (!requireNamespace("ape")) {
>Illumina Single End Apapter 1
ACACTCTTTCCCTACACGACGCTGTTCCATCT
>Illumina Single End Apapter 2
CAAGCAGAAGACGGCATACGAGCTCTTCCGATCT
>Illumina Single End PCR Primer 1
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
>Illumina Single End PCR Primer 2
CAAGCAGAAGACGGCATACGAGCTCTTCCGATCT
>Illumina Single End Sequencing Primer
ACACTCTTTCCCTACACGACGCTCTTCCGATCT
#!/bin/bash
usage ()
{
echo ""
echo "Usage : `basename $0` <tableL6.txt> <L6_clean.tsv>"
echo ""
exit
}
if [ "$1" = "" ]; then