Commit 2be36d97 authored by Carine Rey's avatar Carine Rey
Browse files

fix error in parse tdg09

parent a1606da3
......@@ -57,23 +57,29 @@ for i,line in enumerate(searchlines):
#The FullResults table lists further results from all sites. This includes the log-likelihood for the WAG+ssF (site-specific frequencies or *homogeneous model*) and WAG+lssF (lineage and site-specific frequencies or *non-homogeneous model*). Conserved locations are not analysed, so their entries are 'NA'. Finally, after the FullResults table, the output file contains details of the per-location results, such as the amino acid frequencies estimated by the ssF and lssF models.
# Site, WAG+ssF params, WAG+ssF lnL, WAG+lssF params, WAG+lssF params, delta lnL, dof, LRT, FDR
ll=l.split(",")
(Site,_,lnLnoconv,_,lnLconv,_,_,LRT,FDR) = ll
Site = Site.strip()
lnLconv = lnLconv.strip()
lnLnoconv = lnLnoconv.strip()
FDR = FDR.strip()
if Site and FDR != "NA":
FDR = float(FDR)
fdr[int(Site)-1]=1-FDR
if Site and lnLconv != "NA" and lnLnoconv != "NA":
lnLconv = float(lnLconv)
lnLnoconv = float(lnLnoconv)
prob = prob_ap(lnLconv, lnLnoconv)
prob_post[int(Site)-1]=prob
split_is_ok = False
try:
(Site,_,lnLnoconv,_,lnLconv,_,_,LRT,FDR) = ll
split_is_ok = True
except Exception as exc:
logger.error(str(exc))
logger.error("Pass this line: %s", l)
if split_is_ok:
Site = Site.strip()
lnLconv = lnLconv.strip()
lnLnoconv = lnLnoconv.strip()
FDR = FDR.strip()
if Site and FDR != "NA":
FDR = float(FDR)
fdr[int(Site)-1]=1-FDR
if Site and lnLconv != "NA" and lnLnoconv != "NA":
lnLconv = float(lnLconv)
lnLnoconv = float(lnLnoconv)
prob = prob_ap(lnLconv, lnLnoconv)
prob_post[int(Site)-1]=prob
# Sites Tamuri
......
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