Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BioHelpers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Operate
Terraform modules
Monitor
Incidents
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Faber
BioHelpers
Commits
28866848
Commit
28866848
authored
9 months ago
by
Christian Faber
Browse files
Options
Downloads
Patches
Plain Diff
add sequence position
parent
b889570f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
setup.py
+1
-1
1 addition, 1 deletion
setup.py
src/BioHelpers_FABER.egg-info/PKG-INFO
+1
-1
1 addition, 1 deletion
src/BioHelpers_FABER.egg-info/PKG-INFO
src/BioHelpers_FABER/bio_mod.py
+26
-0
26 additions, 0 deletions
src/BioHelpers_FABER/bio_mod.py
with
28 additions
and
2 deletions
setup.py
+
1
−
1
View file @
28866848
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as f:
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as f:
setup
(
setup
(
name
=
"
BioHelpers_FABER
"
,
name
=
"
BioHelpers_FABER
"
,
version
=
"
0.1.1
3
"
,
version
=
"
0.1.1
4
"
,
description
=
"
Small collection of useful scripts for the computational work with RNA Data.
"
,
description
=
"
Small collection of useful scripts for the computational work with RNA Data.
"
,
url
=
"
https://gitlab.jsc.fz-juelich.de/faber1/biohelpers
"
,
url
=
"
https://gitlab.jsc.fz-juelich.de/faber1/biohelpers
"
,
package_dir
=
{
""
:
"
src
"
},
package_dir
=
{
""
:
"
src
"
},
...
...
This diff is collapsed.
Click to expand it.
src/BioHelpers_FABER.egg-info/PKG-INFO
+
1
−
1
View file @
28866848
Metadata-Version: 2.1
Metadata-Version: 2.1
Name: BioHelpers-FABER
Name: BioHelpers-FABER
Version: 0.1.1
2
Version: 0.1.1
3
Summary: Small collection of useful scripts for the computational work with RNA Data.
Summary: Small collection of useful scripts for the computational work with RNA Data.
Home-page: https://gitlab.jsc.fz-juelich.de/faber1/biohelpers
Home-page: https://gitlab.jsc.fz-juelich.de/faber1/biohelpers
Author: Christian Faber
Author: Christian Faber
...
...
This diff is collapsed.
Click to expand it.
src/BioHelpers_FABER/bio_mod.py
+
26
−
0
View file @
28866848
...
@@ -491,6 +491,32 @@ def numberOfResidues(file: str) -> int:
...
@@ -491,6 +491,32 @@ def numberOfResidues(file: str) -> int:
return
int
(
len
(
res
))
return
int
(
len
(
res
))
def
get_sequence_position
(
filename
:
str
)
->
tuple
:
"""
Show all the non-het Residues in a given pdb file and the associated position in the native molecule.
:param filename: Filename of PDB
:type filename: str
:return: Tuple of list with positions and sequence as string
:rtype: tuple
"""
chain
=
pdb
.
PDBParser
().
get_structure
(
"
id
"
,
filename
)[
0
].
get_chains
()
chain
=
next
(
chain
)
residues
=
chain
.
get_residues
()
r1
=
next
(
residues
)
r2
=
next
(
residues
)
numb
=
[
r1
.
id
[
1
],
r2
.
id
[
1
]]
sequ
=
[
r1
.
get_resname
(),
r2
.
get_resname
()]
for
r
in
residues
:
if
r
.
id
[
0
]
==
"
"
:
sequ
.
append
(
r
.
get_resname
())
if
abs
(
numb
[
-
1
]
-
r
.
id
[
1
])
>
1
:
numb
.
append
(
r
.
id
[
1
])
numb
.
append
(
r
.
id
[
1
])
else
:
numb
[
-
1
]
=
r
.
id
[
1
]
return
(
numb
,
""
.
join
(
sequ
))
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
print
(
"
------------------
"
)
print
(
"
------------------
"
)
print
(
"
gmap 1.0 - sub module
"
)
print
(
"
gmap 1.0 - sub module
"
)
...
...
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