Esempio n. 1
0
    fof = sys.argv[1]
    version = sys.argv[2]
    sampleid = sys.argv[3]
except:
    sys.exit(sys.argv[0] + " <focus output file that ONLY has taxon [tab] percent> <version (any string)> <sampleid (any string)>")


# read FOCUS results
count={}
with open(fof, 'r') as gin:
    for l in gin:
        p=l.strip().split("\t")
        count[p[0].strip()]=float(p[1])

# read our pickled data 
data = load_pickle("/home3/redwards/Cami_Challenge/edwardslab_CAMI/redwards/python/taxonomy.p")

# now we need to go through all levels and sum the results

levels = {}
parent_tax = {}


# print the header information
#

print("#CAMI Submission for Taxonomic Profiling")
print("@Version:0.9.2")
# not supported despite documentation
#print("@_DATABASE_:" + version)
print("@SampleID:"+ sampleid)
Esempio n. 2
0
    fof = sys.argv[1]
    version = sys.argv[2]
    sampleid = sys.argv[3]
except:
    sys.exit(sys.argv[0] + " <focus output file that ONLY has taxon [tab] percent> <version (any string)> <sampleid (any string)>")


# read FOCUS results
count={}
with open(fof, 'r') as gin:
    for l in gin:
        p=l.strip().split("\t")
        count[p[0].strip()]=float(p[1])

# read our pickled data 
data = load_pickle()

# now we need to go through all levels and sum the results

levels = {}
parent_tax = {}


# print the header information
#

print("#CAMI Submission for Taxonomic Profiling")
print("@Version:" + version)
print("@SampleID:"+ sampleid)
print("@Ranks:superkingdom|phylum|class|order|family|genus|species|strain\n")