Commit 3e4716bb authored by Penom Nom's avatar Penom Nom
Browse files

Move biom lib to featureiolib.

parent 20a5cb5b
......@@ -37,7 +37,7 @@ def merge_samples( input_biom, merge_dump, output_biom, min_evidence_nb=None ):
observation (@see Biom.reset_count_by_replicates_evidence).
"""
import pickle
from workflows.gene_diversity.lib.Biom import BiomIO
from jflow.featureio import BiomIO
# Retrieve merge rules
merge = open(merge_dump, "rb")
......@@ -59,7 +59,7 @@ def filter_and_bootstrap( input_biom, output_biom, observation_threshold, nb_del
"""
@summary :
"""
from workflows.gene_diversity.lib.Biom import BiomIO
from jflow.featureio import BiomIO
biom = BiomIO.from_json( input_biom )
# Filter
......@@ -79,7 +79,7 @@ def filter_seq( input_fasta, input_biom, output_fasta ):
@param input_biom : [str] path to the file with the IDs of kept sequences (biom file).
@param output_fasta : [str] path to the filtered fasta.
"""
from workflows.gene_diversity.lib.Biom import BiomIO
from jflow.featureio import BiomIO
import jflow.seqio as seqio
biom = BiomIO.from_json( input_biom )
......
......@@ -44,7 +44,7 @@ def to_biom( output_biom, clusters_file, precluster_sample_sep, precluster_size_
precluster_size_sep.
Example : precluster_size_sep=';' where sequence ID = 'seq10001;83'.
"""
from workflows.gene_diversity.lib.Biom import Biom, BiomIO
from jflow.featureio import Biom, BiomIO
samples_seen = dict()
biom = Biom( generated_by='cdhit', matrix_type="sparse" )
......@@ -116,7 +116,7 @@ def rename_seq( input_fasta, clusters_file, renamed_fasta ):
clusters_fh.close()
# Rename sequences
reader = seqio.SequenceReader( input_fasta )
reader = seqio.FastaReader( input_fasta )
out_fh = open( renamed_fasta, "w" )
for id, desc, seq, qual in reader :
seqio.writefasta( out_fh, [[cluster_representative[id], desc, seq, qual]] )
......
......@@ -31,7 +31,7 @@ def biom_to_count( biom_file, count_file ):
@param biom_file : [str] path to the biom to process.
@param count_file : [str] path to the output file.
"""
from workflows.gene_diversity.lib.Biom import Biom, BiomIO
from jflow.featureio import BiomIO
biom = BiomIO.from_json( biom_file )
out_fh = open( count_file, "w" )
......@@ -62,7 +62,7 @@ def biom_to_krona( exec_path, stem_path_krona, biom_file, log_file ):
@param biom_file : [str] path to the biom to process.
@param log_file : [str] path to the log file.
"""
from workflows.gene_diversity.lib.Biom import Biom, BiomIO
from jflow.featureio import BiomIO
from subprocess import Popen, PIPE
import sys
......@@ -90,7 +90,7 @@ def add_tax_metadata( biom_file, blast_file, taxonomy_file, output_file ):
@param output_file : [string] the path to the output file.
"""
import os
from workflows.gene_diversity.lib.Biom import Biom, BiomIO
from jflow.featureio import BiomIO
def init_cluster_count(sample_names):
samples_count = {}
......
......@@ -27,7 +27,7 @@ def observations_depth( input_biom, output_depth ):
3<TAB>0<TAB>0.000
4<TAB>5<TAB>5.000
"""
from workflows.gene_diversity.lib.Biom import BiomIO
from jflow.featureio import BiomIO
obs_depth = list()
nb_observ = 0
......@@ -56,7 +56,7 @@ def samples_hclassification( input_biom, output_dendrogram, distance_method, lin
from scipy.spatial.distance import pdist, squareform
from scipy.cluster.hierarchy import linkage, dendrogram
import scipy.cluster.hierarchy
from workflows.gene_diversity.lib.Biom import BiomIO
from jflow.featureio import BiomIO
def add_node( node, parent ):
"""
......
......@@ -43,12 +43,14 @@ merge.group = SAMPLES section
read_1.name = Reads 1
read_1.flag = --read-1
read_1.help = The path to the Read 1.
read_1.type = localfile
read_1.action = append
read_1.required = True
# Parameter read-2
read_2.name = Reads 2
read_2.flag = --read-2
read_2.help = The path to the Read 2.
read_2.type = localfile
read_2.action = append
read_2.required = True
# Parameter samples_names
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment