This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import biom | |
import numpy as np | |
import pandas as pd | |
def _parse_sample_lines(line): | |
""" | |
Extracts the sample name from the kraken identifier | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def tidy_taxon_silva(x): | |
""" | |
A very ugly script for cleaning taxonomy. | |
The script will take the string, and parse it into seven taxonomic levels | |
if they are avalaible. If lower levels are unavalaible (i.e. they could | |
not be classified accurately), then they will inheriet a designation | |
from the last classified level. Then, ambigious or uncultured organisms |