Commit f74aeff0 by Eric Coissac

Merge branch 'master' of git@git.metabarcoding.org:obitools/obitools.git

parents b9fa718a 6bf6cc66
......@@ -24,7 +24,7 @@ filtering purposes or for statistics computing.
.. code-block:: bash
> obiannotate --rank seq1.fasta | \\
> obiannotate --seq-rank seq1.fasta | \\
obiannotate -C --set-identifier '"'FungA'_%05d" % seq_rank' \\
> seq2.fasta
......
......@@ -98,26 +98,26 @@ siteurl="http://www.arb-silva.de/"
baseurl="%sno_cache/download/archive/current/Exports" % siteurl
# (options.rrna,options.type,options.trunc,options.nr)
seqfilepattern={('lsu','parc',False,False) : "SILVA_%d_LSUParc_tax_silva.fasta.gz",
seqfilepattern={('lsu','parc',False,False) : "SILVA_%s_LSUParc_tax_silva.fasta.gz",
('lsu','parc',False,True ) : None,
('lsu','parc',True ,False) : "SILVA_%d_LSUParc_tax_silva_trunc.fasta.gz",
('lsu','parc',True ,False) : "SILVA_%s_LSUParc_tax_silva_trunc.fasta.gz",
('lsu','parc',True ,True ) : None,
('lsu','ref' ,False,False) : "SILVA_%d_LSURef_tax_silva.fasta.gz",
('lsu','ref' ,False,False) : "SILVA_%s_LSURef_tax_silva.fasta.gz",
('lsu','ref' ,False,True ) : None,
('lsu','ref' ,True ,False) : "SILVA_%d_LSURef_tax_silva_trunc.fasta.gz",
('lsu','ref' ,True ,False) : "SILVA_%s_LSURef_tax_silva_trunc.fasta.gz",
('lsu','ref' ,True ,True ) : None,
('ssu','parc',False,False) : "SILVA_%d_SSUParc_tax_silva.fasta.gz",
('ssu','parc',False,False) : "SILVA_%s_SSUParc_tax_silva.fasta.gz",
('ssu','parc',False,True ) : None,
('ssu','parc',True ,False) : "SILVA_%d_SSUParc_tax_silva_trunc.fasta.gz",
('ssu','parc',True ,False) : "SILVA_%s_SSUParc_tax_silva_trunc.fasta.gz",
('ssu','parc',True ,True ) : None,
('ssu','ref' ,False,False) : "SILVA_%d_SSURef_tax_silva.fasta.gz",
('ssu','ref' ,False,True ) : "SILVA_%d_SSURef_Nr99_tax_silva.fasta.gz",
('ssu','ref' ,True ,False) : "SILVA_%d_SSURef_tax_silva_trunc.fasta.gz",
('ssu','ref' ,True ,True ) : "SILVA_%d_SSURef_Nr99_tax_silva_trunc.fasta.gz"
('ssu','ref' ,False,False) : "SILVA_%s_SSURef_tax_silva.fasta.gz",
('ssu','ref' ,False,True ) : "SILVA_%s_SSURef_Nr99_tax_silva.fasta.gz",
('ssu','ref' ,True ,False) : "SILVA_%s_SSURef_tax_silva_trunc.fasta.gz",
('ssu','ref' ,True ,True ) : "SILVA_%s_SSURef_Nr99_tax_silva_trunc.fasta.gz"
}
# (options.rrna,options.nr)
taxfilepattern={'lsu' : "tax_slv_lsu_%d.txt",
'ssu' : "tax_slv_ssu_nr_%d.txt"
taxfilepattern={'lsu' : "tax_slv_lsu_%s.txt",
'ssu' : "tax_slv_ssu_nr_%s.txt"
}
def getHyperlink(url):
......@@ -153,14 +153,14 @@ def silvaURLS(options):
silvafile = [x for x in archive.keys()
if x.startswith('SILVA') and (x.endswith('fasta.gz') or x.endswith('fasta'))
]
versions = [tuple(map(int, x.split('_')[1].split('.'))) for x in silvafile]
versions.sort(reverse=True)
version='.'.join(map(str,versions[0]))
#if all(x==versions[0] for x in versions):
# version = int(versions[0])
#else:
# raise AssertionError("Unable to identify the database version")
versions = [int(x.split('_')[1]) for x in silvafile]
if all(x==versions[0] for x in versions):
version = int(versions[0])
else:
raise AssertionError("Unable to identify the database version")
whichfile = (options.rrna,options.type,options.trunc,options.nr)
seqfile = seqfilepattern[whichfile]
......@@ -189,7 +189,7 @@ def silvaURLS(options):
taxfile=taxfile+'.gz'
taxurl = taxonomy[taxfile]
output = "silva_%d_%s%s_%s%s" % (version,options.rrna,options.type,
output = "silva_%s_%s%s_%s%s" % (version,options.rrna,options.type,
{True:"nr_" , False:""}[options.nr],
{True:"trunc" , False:"full"}[options.trunc]
)
......@@ -353,4 +353,3 @@ if __name__ == '__main__':
ecoTaxonomyWriter(options.ecopcroutput,options.taxonomy,onlyLocal=True)
\ No newline at end of file
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