Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
genotoul-bioinfo
ng6
Commits
3e4716bb
Commit
3e4716bb
authored
Jun 26, 2014
by
Penom Nom
Browse files
Move biom lib to featureiolib.
parent
20a5cb5b
Changes
5
Hide whitespace changes
Inline
Side-by-side
workflows/gene_diversity/components/biomsampling.py
View file @
3e4716bb
...
...
@@ -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.B
io
m
import
BiomIO
from
jflow.feature
io
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.B
io
m
import
BiomIO
from
jflow.feature
io
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.B
io
m
import
BiomIO
from
jflow.feature
io
import
BiomIO
import
jflow.seqio
as
seqio
biom
=
BiomIO
.
from_json
(
input_biom
)
...
...
workflows/gene_diversity/components/cdhit.py
View file @
3e4716bb
...
...
@@ -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.B
io
m
import
Biom
,
BiomIO
from
jflow.feature
io
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
.
Sequence
Reader
(
input_fasta
)
reader
=
seqio
.
Fasta
Reader
(
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
]]
)
...
...
workflows/gene_diversity/components/geneotuclassify.py
View file @
3e4716bb
...
...
@@ -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.B
io
m
import
Biom
,
BiomIO
from
jflow.feature
io
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.B
io
m
import
Biom
,
BiomIO
from
jflow.feature
io
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.B
io
m
import
Biom
,
BiomIO
from
jflow.feature
io
import
BiomIO
def
init_cluster_count
(
sample_names
):
samples_count
=
{}
...
...
workflows/gene_diversity/lib/biomstat.py
View file @
3e4716bb
...
...
@@ -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.B
io
m
import
BiomIO
from
jflow.feature
io
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.B
io
m
import
BiomIO
from
jflow.feature
io
import
BiomIO
def
add_node
(
node
,
parent
):
"""
...
...
workflows/gene_diversity/workflow.properties
View file @
3e4716bb
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment