Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mrdna
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tbgl
tools
mrdna
Commits
ce3875b7
Commit
ce3875b7
authored
7 months ago
by
pinyili2
Browse files
Options
Downloads
Patches
Plain Diff
add
parent
219c598c
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Pinyili2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mrdna/readers/segmentmodel_from_cadnano.py
+4
-14
4 additions, 14 deletions
mrdna/readers/segmentmodel_from_cadnano.py
with
4 additions
and
14 deletions
mrdna/readers/segmentmodel_from_cadnano.py
+
4
−
14
View file @
ce3875b7
...
...
@@ -158,7 +158,7 @@ def gen_id_series(strand,part):
return
[
pd
.
Series
(
df
.
loc
[
i
])
for
i
in
df
.
index
]
def
gen_prop_table
(
part
,
seq_file
=
None
,
fill_seq
=
"
T
"
):
def
gen_prop_table
(
part
):
strand_set
=
[]
for
i
in
part
.
getidNums
():
fwd
,
rev
=
part
.
getStrandSets
(
i
)
...
...
@@ -197,16 +197,6 @@ def gen_prop_table(part,seq_file=None,fill_seq="T"):
nt_prop
[
"
bp
"
][
bp2
]
=
bp1
except
:
pass
if
seq_file
is
not
None
:
#under construction
seq
=
open
(
seq_file
,
"
r
"
)
for
seqline
in
seq
:
try
:
int
(
seqline
[
0
])
except
:
continue
return
nt_prop
...
...
@@ -214,9 +204,9 @@ def mrdna_model_from_cadnano(json_file,seq=None,**model_parameters):
json_data
=
read_json_file
(
json_file
)
part
,
decoder
=
cadnano_parts
(
json_data
)
if
decoder
==
2
:
nt_prop
=
gen_prop_table
_cad2
(
json_data
,
part
)
nt_prop
=
gen_prop_table
(
part
)
elif
decoder
==
3
:
nt_prop
=
gen_prop_table
_cad3
(
json_data
,
part
)
nt_prop
=
gen_prop_table
(
part
)
if
seq
is
None
:
if
nt_prop
[
"
seq
"
][
0
]
==-
1
:
...
...
@@ -229,5 +219,5 @@ def mrdna_model_from_cadnano(json_file,seq=None,**model_parameters):
three_prime
=
np
.
array
((
list
(
nt_prop
[
"
threeprime
"
])))
stack
=
np
.
array
((
list
(
nt_prop
[
"
stack
"
])))
orientation
=
np
.
array
(
list
(
nt_prop
[
"
orientation
"
]))
model
=
model_from_basepair_stack_3prime
(
r
,
bp
,
stack
,
three_prime
,
seq
,
orientation
=
None
,
**
model_parameters
)
model
=
model_from_basepair_stack_3prime
(
r
,
bp
,
stack
,
three_prime
,
seq
,
orientation
,
**
model_parameters
)
return
model
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment