Skip to content

Commit

Permalink
merge master from origin
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibor committed Sep 22, 2020
1 parent ddc48cb commit 1d3d81d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
39 changes: 0 additions & 39 deletions pydamage/accuracy_model.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
<<<<<<< HEAD
from pypmml import Model
import pkg_resources
=======
import pkg_resources
import pandas as pd
import numpy as np
import pickle
>>>>>>> 204d4fca36b046450dcecc7462719d37557d69ad


def load_model():
"""Returns the pmml model"""
# This is a stream,like object. If you want the actual info, call
# stream.read()
<<<<<<< HEAD
stream = pkg_resources.resource_stream(__name__, "models/accuracy_model.xml")
return Model.load(stream)
=======
stream = pkg_resources.resource_stream(__name__, "models/glm_accuracy_model.pickle")
return pickle.load(stream)
>>>>>>> 204d4fca36b046450dcecc7462719d37557d69ad


def prepare_data(pd_df):
Expand All @@ -28,32 +16,6 @@ def prepare_data(pd_df):
Args:
pd_df (pandas DataFrame):pydamage df result
"""
<<<<<<< HEAD
reflen_bins = [
(500, 1000),
(1000, 2000),
(2000, 5000),
(5000, 10000),
(10000, 20000),
(20000, 50000),
(50000, 100000),
(100000, 200000),
(200000, 500000),
]

coverage_bins = [
(1, 2),
(2, 3),
(3, 5),
(5, 10),
(10, 20),
(20, 50),
(50, 100),
(100, 200),
(200, 500),
]
pd_df = pd_df[["coverage", "reflen", "pmax", "gc_content"]]
=======
coverage_bins = pd.IntervalIndex.from_tuples(
[
(0, 2),
Expand Down Expand Up @@ -127,4 +89,3 @@ def fit_model(df, model):
model (pypmml model): GLM accuracy model
"""
return model.predict(df).to_frame(name="pred_accuracy")
>>>>>>> 204d4fca36b046450dcecc7462719d37557d69ad
4 changes: 0 additions & 4 deletions pydamage/gc_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ def __init__(self, fasta):
fasta (str): Path to fasta file
"""
self.fasta = {}
<<<<<<< HEAD
for record in SeqIO.parse(fasta_file, "fasta"):
=======
for record in SeqIO.parse(fasta, "fasta"):
>>>>>>> 204d4fca36b046450dcecc7462719d37557d69ad
self.fasta[record.id] = record

def compute_gc(self):
Expand Down

0 comments on commit 1d3d81d

Please sign in to comment.