Commit 5db48a4a authored by Amine  GHOZLANE's avatar Amine GHOZLANE

debug resume

parent faa3a1d7
......@@ -138,7 +138,7 @@ def get_sequence(list_query, target_file, not_in_database):
def fill(text, width=80):
"""Split text"""
return os.linesep.join(text[i:i+width] for i in xrange(0, len(text), width))
return os.linesep.join(text[i:i+width] for i in range(0, len(text), width))
def write_sequence(results, sequence_data, output_file, verbose):
......
......@@ -85,7 +85,8 @@ def write_result(data_dict, output_file):
key_list = [
'Number of raw reads', 'Number of reads mapped against human',
'Number of reads mapped against mouse','Number of reads mapped against phi',
'Number of reads after filtering', 'Number of reads mapped against genome set',
'Number of reads after filtering', 'Number of reads after trimming',
'Number of reads mapped against genome set',
'Number of reads annotated with BLAST', 'Number of reads annotated with DIAMOND'
]
sample_list = data_dict.keys()
......@@ -109,8 +110,8 @@ def main():
args = getArguments()
sample = ""
for resume in args.resume_list:
print(resume)
sample = resume.replace("_resume_nb_reads.txt", "")
sample = sample.replace("_trim_nb_reads.txt", "")
sample = sample.replace("_tax.txt", "")
sample = sample.replace("_taxdia.txt", "")
data_dict = load_csv(resume, data_dict, sample)
......@@ -131,8 +132,7 @@ def main():
for resume in args.map_genome_list:
sample = resume.replace(".txt", "")
data_dict = load_bowtie_resume(resume, data_dict, sample, "genome set")
print(data_dict)
#print(data_dict)
write_result(data_dict, args.output_file)
if __name__ == '__main__':
......
......@@ -220,7 +220,7 @@ process fastqtofasta {
process blast {
cpus params.cpus
memory "15G"
memory "30G"
input:
set sample_id, file(fasta) from notalignedfastaChannel
......@@ -242,7 +242,7 @@ process blast {
process taxonomy {
beforeScript ='source /local/gensoft2/adm/etc/profile.d/modules.sh;module use /pasteur/projets/policy01/Matrix/modules'
module = 'Python/3.6.0:taxadb/0.6.0'
memory "4G"
memory "10G"
input:
set sample_id, file(fasta), file(nt) from blastChannel
......@@ -283,7 +283,7 @@ process taxonomy {
process diamond {
cpus params.cpus
memory "15G"
memory "30G"
input:
set sample_id, file(fasta), file(notannotatedfasta), file(taxblast) from notAnnotatedChannel
......
......@@ -230,7 +230,7 @@ process fastqtofasta {
process blast {
cpus params.cpus
memory "15G"
memory "30G"
input:
set sample_id, file(fasta) from notalignedfastaChannel
......@@ -252,7 +252,7 @@ process blast {
process taxonomy {
beforeScript ='source /local/gensoft2/adm/etc/profile.d/modules.sh;module use /pasteur/projets/policy01/Matrix/modules'
module = 'Python/3.6.0:taxadb/0.6.0'
memory "4G"
memory "10G"
input:
set sample_id, file(fasta), file(nt) from blastChannel
......@@ -273,13 +273,13 @@ process taxonomy {
ExtractNCBIDB2.py -f !{nt} -g !{sample_id}_taxonomy.txt -nb 1 \
-o !{sample_id}_annotation.txt
# Get sequence not annotated
if [ -f !{sample_id}_annotation.txt ]
then
extract_fasta.py -q !{sample_id}_annotation.txt \
#if [ -f "!{sample_id}_annotation.txt" ]
#then
extract_fasta.py -q !{sample_id}_annotation.txt \
-t !{fasta} -n -o !{sample_id}_not_annotated.fasta
else
touch !{sample_id}_annotation.txt !{sample_id}_not_annotated.fasta
fi
#else
# touch !{sample_id}_annotation.txt !{sample_id}_not_annotated.fasta
#fi
else
cat !{fasta} > !{sample_id}_not_annotated.fasta
......@@ -415,7 +415,7 @@ process resume {
script:
"""
resume.py -i ${resmap} ${restax} ${restaxdia} -m ${map} -mg ${resmapgenome} -o resume.tsv
resume.py -i ${resmap} ${restrim} ${restax} ${restaxdia} -m ${map} -mg ${resmapgenome} -o resume.tsv
"""
}
......
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