示例#1
0
文件: run.py 项目: Xiuying/illumitag
# Run seqenv #
cluster.otu_uparse.seqenv.threshold = 1.0
cluster.otu_uparse.seqenv.N = 5000
cluster.otu_uparse.seqenv.run()

# Run seqenv via SLURM #
cluster.run(steps=[{'otu_uparse.seqenv.run': {}}])
cluster.run_slurm(steps=[{'otu_uparse.seqenv.run': {}}], time="04:00:00")

# Check some matrix multiplications #
otu_vs_envo = cluster.otu_uparse.seqenv.base_dir + "centers_N1000_blast_F_ENVO_OTUs_labels.csv"
otu_vs_envo = pandas.io.parsers.read_csv(otu_vs_envo, sep=',', index_col=0, encoding='utf-8')
otu_vs_samples = cluster.otu_uparse.seqenv.base_dir + "abundances.csv"
otu_vs_samples = pandas.io.parsers.read_csv(otu_vs_samples, sep=',', index_col=0, encoding='utf-8')
otu_vs_samples = otu_vs_samples.loc[otu_vs_envo.index]
otu_vs_samples = otu_vs_samples.transpose()
result_us = otu_vs_samples.dot(otu_vs_envo)
result_them = cluster.otu_uparse.seqenv.base_dir + "centers_N1000_blast_F_ENVO_samples_labels.csv"
result_them = pandas.io.parsers.read_csv(result_them, sep=',', index_col=0, encoding='utf-8')
result_them.sum(axis=1)
cluster.otu_uparse.taxonomy_silva.otu_table

###############################################################################
# Print SRA information #
for s in cluster: s.sra.upload_to_sra()
from illumitag.helper.sra import MakeSpreadsheet
make_tsv = MakeSpreadsheet(cluster)
make_tsv.write_bio_tsv()
make_tsv.write_sra_tsv()

示例#2
0
###############################################################################
# Get vars #
samples_pyro = [s for s in illumitag.pyrosamples if s.run_num==9999]
samples = [s.mate for s in samples_pyro]
cluster = illumitag.clustering.Cluster(samples, 'soda_model_lakes')

# Upload raw samples for SRA #
pool = illumitag.runs[3][7]
pool.create_raw_samples()
for s in samples: s.sra.upload_to_sra()
for s in samples_pyro: s.sra.upload_to_sra()

# Create BioSamples #
from illumitag.helper.sra import MakeSpreadsheet
make_tsv = MakeSpreadsheet(cluster)
make_tsv.write_bio_tsv()

# Submit to SRA #
make_tsv.write_sra_tsv()

# The pyro samples #
cluster_pyro = illumitag.clustering.Cluster(samples_pyro, 'soda_model_lakes_pyro')
make_tsv_pyro = MakeSpreadsheet(cluster_pyro)
make_tsv_pyro.platform                = "LS454"
make_tsv_pyro.instrument_model        = "454 GS FLX Titanium"
make_tsv_pyro.forward_read_length     = "500"
make_tsv_pyro.reverse_read_length     = "500"
make_tsv_pyro.forward_filetype        = "sff"
make_tsv_pyro.reverse_filetype        = "sff"
make_tsv_pyro.write_sra_tsv()