From 3e4fdb8dc95180a8d2c82ab8c706f1303caeafc4 Mon Sep 17 00:00:00 2001 From: Aaron Weimann Date: Tue, 26 Apr 2016 11:19:29 +0200 Subject: [PATCH] Pfam annotation fixed, hmm2gff.py execution fixed - Got rid of duplicate column names in the Pfam data frame, which cause a problem in pandas-0.13.1 - Fixed feature track generation, hmm2gff.py was not properly included as executable - Changed version to 1.0.4 --- Dockerfile | 4 ++-- setup.py | 2 +- traitar/_version.py | 2 +- traitar/hmmer2filtered_best.py | 2 +- traitar/traitar | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e9e8e11..4e66e52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,8 @@ RUN echo "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted RUN apt-get update RUN apt-get install -y hmmer prodigal RUN apt-get install -y wget -COPY dist/traitar-1.0.1.tar.gz /tmp +COPY dist/traitar-1.0.4.tar.gz /tmp COPY traitar/data/sample_data /tmp/sample_data -RUN pip install /tmp/traitar-1.0.1.tar.gz +RUN pip install /tmp/traitar-1.0.4.tar.gz COPY Pfam-A.hmm /tmp RUN traitar pfam --local /tmp diff --git a/setup.py b/setup.py index 932b852..3d66c20 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,6 @@ license='GNU General Public License, version 3 (GPL-3.0)', packages= ['traitar'], include_package_data = True, - scripts = ['traitar/traitar', 'traitar/merge_preds.py', 'traitar/heatmap.py', 'traitar/domtblout2gene_generic.py', 'traitar/predict.py', 'traitar/hmmer2filtered_best.py'], + scripts = ['traitar/traitar', 'traitar/merge_preds.py', 'traitar/heatmap.py', 'traitar/domtblout2gene_generic.py', 'traitar/predict.py', 'traitar/hmmer2filtered_best.py', 'traitar/hmm2gff.py'], zip_safe=False, install_requires = ["pandas >= 0.13.1", "matplotlib >= 1.3.1", "numpy >= 1.6", "scipy >= 0.13.3"]) diff --git a/traitar/_version.py b/traitar/_version.py index 976498a..92192ee 100644 --- a/traitar/_version.py +++ b/traitar/_version.py @@ -1 +1 @@ -__version__ = "1.0.3" +__version__ = "1.0.4" diff --git a/traitar/hmmer2filtered_best.py b/traitar/hmmer2filtered_best.py index 564e7ff..3d9e024 100755 --- a/traitar/hmmer2filtered_best.py +++ b/traitar/hmmer2filtered_best.py @@ -3,7 +3,7 @@ import sys import pandas as ps from StringIO import StringIO -hmmer_colnames = ['target name','accession','tlen','query name','accession','qlen','E-value','score','bias','#','of','c-Evalue','i-Evalue','score','bias','from','to','from','to','from','to','acc','description of target'] +hmmer_colnames = ['target name','target accession','tlen','query name','accession','qlen','E-value','score_overall','bias_overall','#','of','c-Evalue','i-Evalue','score_domain','bias_domain','from_hmm','to_hmm','ali_from','ali_to','env_from','env_to','acc','description of target'] def apply_thresholds(infile_f, eval_threshold, bit_score_thresh, out_filt_f, out_excl_f): """parse HMMER output file and apply thresholds for e-valu and bit score)""" #preparse lines by replacing white space delimitation by tabs diff --git a/traitar/traitar b/traitar/traitar index 0fa5237..650ab7d 100755 --- a/traitar/traitar +++ b/traitar/traitar @@ -244,7 +244,7 @@ class Traitar: def run_feature_track_generation(self, in_samples, mode, gene_gffs = None, gene_gff_type = "prodigal"): #create output directory for the pfam annotation - hmm2gff = "%(phenolyzer)s/hmm2gff.py %(out_dir)s/pfam_annotation/%(sample)s_filtered_best.dat %(gene_gff)s %(out_gff_dir)s %(sample)s " + gene_gff_type + " %(model_tar)s %(predicted_pts)s" + hmm2gff = "hmm2gff.py %(out_dir)s/pfam_annotation/%(sample)s_filtered_best.dat %(gene_gff)s %(out_gff_dir)s %(sample)s " + gene_gff_type + " %(model_tar)s %(predicted_pts)s" #read in phypat predictions phypat_preds = ps.read_csv(os.path.join(self.phypat_dir, "predictions_majority-vote.txt"), index_col = 0, sep = "\t") phypat_pgl_preds = ps.read_csv(os.path.join(self.phypat_pgl_dir, "predictions_majority-vote.txt"), index_col = 0, sep = "\t")