Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Kevin Meza Landeros
/
MonogenicDiseases
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Kevin Meza Landeros
2020-05-02 21:57:00 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b59fb9bb6881b5b96e80dc71c0a7b09bf368130a
b59fb9bb
1 parent
48f4daa4
SCRIPT;Obtencion de Secuencias
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
scripts/ObtencionSecuencias.R
scripts/ObtencionSecuencias.R
0 → 100644
View file @
b59fb9b
# EQUIPO 5
# ENFERMEDADES MONOGENICAS
# Este script este creado para obtener las secuencias de los genes seleccionados previamente.
# Usamos el Gene Ensembl ID para obtener las secuencias de Ensembl
# Llamado de librerias
library
(
httr
)
library
(
jsonlite
)
library
(
xml2
)
# Lectura dearchivos
##En esta parte colocar path de archivo all_data.txt
all_data
<-
read.csv
(
file
=
"C:/Users/Fer/Desktop/all_data.txt"
,
header
=
FALSE
,
sep
=
"\t"
)
##Seleccion de la columna seis, que contiene los Gene Ensembl IDs de cada uno de nuestrso genes
IDs
<-
all_data
$
V
6
IDs
[
15160
]
## Por cada gen conecta a ensembl y hace una solicitud de la secuencia dado el Gene Enesembl ID
for
(
i
in
1
:
length
(
IDs
)){
server
<-
"https://rest.ensembl.org"
ext
<-
paste
(
"/sequence/id/"
,
IDs
[
i
],
sep
=
""
)
%>%
paste
(
"?species=homo_sapiens"
,
sep
=
""
)
r
<-
GET
(
paste
(
server
,
ext
,
sep
=
""
),
content_type
(
"text/x-fasta"
))
stop_for_status
(
r
)
## vamos generando un archivo con las secuencias em formato fasta. Colocar path donde desee el archivo fasta.
write.table
(
x
=
content
(
r
),
file
=
"C:/Users/Fer/Desktop/seqs_tot.fasta"
,
quote
=
FALSE
,
row.names
=
FALSE
,
col.names
=
FALSE
,
append
=
TRUE
,
eol
=
""
)
}
\ No newline at end of file
Please
register
or
login
to post a comment