Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BIOINF588
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Analyze
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
Etienne MORICE
BIOINF588
Commits
e0b7960c
Commit
e0b7960c
authored
6 years ago
by
Amaury LEROY
Browse files
Options
Downloads
Patches
Plain Diff
10/03
parent
b0f40c87
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projet_steyeart.py
+14
-9
14 additions, 9 deletions
projet_steyeart.py
with
14 additions
and
9 deletions
projet_steyeart.py
+
14
−
9
View file @
e0b7960c
...
...
@@ -4,31 +4,37 @@ Created on Tue Jan 22 15:39:51 2019
@author: Amaury Leroy
"""
######################## PROJET JEAN-MARC STEYAERT ############################
import
numpy
as
np
import
re
import
os
from
Bio.ExPASy
import
Prosite
#help(Prosite)
print
(
"
1. Détection de signatures sur un génome complet
"
)
print
(
"
1.1 Identification du motif
"
)
import
urllib.request
urllib
.
request
.
urlretrieve
(
"
ftp://ftp.expasy.org/databases/prosite/prosite.dat
"
,
"
prosite.dat
"
)
handle
=
open
(
"
prosite.dat
"
)
records
=
Prosite
.
parse
(
handle
)
#for record in records:
for
record
in
(
r
for
r
in
records
if
"
P-loop
"
in
r
.
description
):
print
(
record
.
accession
)
print
(
record
.
pattern
)
print
(
"
Le code d
'
accès Prosite du motif est:
"
,
record
.
accession
)
print
(
"
Son motif structural est:
"
,
record
.
pattern
)
handle
.
close
()
#Questions 3/4/5
print
(
"
1.2 Lecture du format
"
)
import
subprocess
import
Bio.SeqIO
def
download_orf_code
():
urllib
.
request
.
urlretrieve
(
"
http://downloads.yeastgenome.org/sequence/S288C_reference/orf_dna/orf_coding_all.fasta.gz
"
,
"
orf.fasta.gz
"
)
subprocess
.
call
([
"
gunzip
"
,
"
-k
"
,
"
orf.fasta.gz
"
])
return
"
orf.fasta.gz
"
print
(
"
La taille du fichier fasta est:
"
,
os
.
stat
(
"
orf.fasta
"
).
st_size
,
"
bytes
"
)
return
"
orf.fasta
"
def
read_fasta
(
filename
):
file
=
open
(
filename
,
"
r
"
)
...
...
@@ -37,7 +43,6 @@ def read_fasta(filename):
file
.
close
()
filename
=
download_orf_code
()
filename
=
"
orf.fasta
"
read_fasta
(
filename
)
...
...
@@ -176,7 +181,7 @@ for i in ploop_indices:
if
no_site
:
unrestricted
.
append
((
rec
.
id
,
no_site
))
import
os
#os.mkdir("cartes_restrictions")
for
sequence
in
sequences
:
...
...
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