Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Klinische Genetica
prinia
Commits
86cbe6d0
Commit
86cbe6d0
authored
Jul 11, 2018
by
Sander Bollen
Browse files
fix read mode on region reeader.
parent
204024b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
86cbe6d0
...
...
@@ -14,7 +14,6 @@ Furthermore, the following python packages are required:
*
biopython >= 1.66
*
lxml >= 3.4.4
*
pyfaidx >= 0.4.4
*
fastools >= 0.12.0
*
pyvcf >= 0.6.7
...
...
prinia/design.py
View file @
86cbe6d0
...
...
@@ -278,12 +278,17 @@ def find_snps(primer, db_snp=None, field="AF"):
except
:
return
None
if
db_snp
is
None
:
return
None
reader
=
vcf
.
Reader
(
filename
=
db_snp
)
left_end
=
int
(
primer
.
left_pos
)
+
len
(
primer
.
left
)
right_end
=
int
(
primer
.
right_pos
)
+
len
(
primer
.
right
)
contigs
=
list
(
reader
.
contigs
.
keys
())
if
len
(
contigs
)
==
0
:
raise
ValueError
(
"The VCF file does not contain contigs in the header."
)
if
"chr"
in
contigs
[
0
]
and
not
"chr"
in
primer
.
chromosome
:
chrom
=
"chr"
+
primer
.
chromosome
elif
"chr"
in
primer
.
chromosome
and
not
"chr"
in
contigs
[
0
]:
...
...
prinia/primerdesign.py
View file @
86cbe6d0
...
...
@@ -56,7 +56,7 @@ def primers_from_region(bed_path, padding, product_size, n_prims, reference,
"""**prim_args will be passed on to primer3"""
regions
=
[]
primers
=
[]
with
open
(
bed_path
,
"r
b
"
)
as
bed
:
with
open
(
bed_path
,
"r"
)
as
bed
:
for
line
in
bed
:
if
line
.
startswith
(
"track"
):
# ignore tracklines
continue
...
...
@@ -273,6 +273,3 @@ def main():
if
__name__
==
'__main__'
:
main
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment