Skip to content

Commit

Permalink
Fix bug when removing primers.
Browse files Browse the repository at this point in the history
Update dependencies.
  • Loading branch information
donkirkby committed Jun 29, 2021
1 parent db92888 commit 57f43bb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gotoh = {subdirectory = "micall/alignment", ref = "v7.7.0", git = "https://githu
numpy = "==1.18.4"
python-levenshtein = "==0.12.0"
pandas = "==1.0.5"
requests = "==2.24.0"
requests = "==2.25.1"
pyyaml = "*"

[dev-packages]
Expand Down
47 changes: 24 additions & 23 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions gene_splicer/primer_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ def add_primers(row):

def remove_primers(row):
# Strip the primers out
newseq = row.sequence[int(row.fwd_sample_primer_size
):-int(row.rev_sample_primer_size)]
newseq = row.sequence[
row.fwd_sample_primer_size + row.fwd_sample_primer_start
:-(row.rev_sample_primer_size + row.rev_sample_primer_start)]
row.sequence = newseq
return row

Expand All @@ -395,7 +396,7 @@ def filter_df(df, nodups=True):
filtered = df[(df['error'].isna()
& df['fwd_error'].isna()
& df['rev_error'].isna())]
filtered = filtered.apply(remove_primers, axis=1)
filtered = filtered.apply(remove_primers, axis=1, result_type='broadcast')
if nodups:
filtered = filtered.drop_duplicates(subset='sample', keep=False)
if not filtered.empty:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

setup(
name='gene_splicer',
version='v2.3.1',
version='v2.3.9',
packages=find_packages(),
install_requires=[
'gotoh @ git+https://github.com/cfe-lab/[email protected]#egg=gotoh&subdirectory=micall/alignment',
'numpy==1.18.4',
'python-Levenshtein==0.12.0',
'pandas==1.0.5',
'requests==2.24.0',
'requests==2.25.1',
'pyyaml'
],
package_data={
Expand Down

0 comments on commit 57f43bb

Please sign in to comment.