-
Notifications
You must be signed in to change notification settings - Fork 1
/
CoreAPI.html
227 lines (202 loc) · 10.7 KB
/
CoreAPI.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng"><!-- InstanceBegin template="/Templates/new_template_leftmenu.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="EBI Web Team" />
<meta http-equiv="Content-Language" content="en-GB" />
<meta http-equiv="Window-target" content="_top" />
<meta name="no-email-collection" content="http://www.unspam.com/noemailcollection/" />
<meta name="generator" content="Dreamweaver 8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title id="doctitle">Core API Exercises</title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" href="http://www.ebi.ac.uk/inc/css/contents.css" type="text/css" />
<link rel="stylesheet" href="http://www.ebi.ac.uk/inc/css/userstyles.css" type="text/css" />
<script src="http://www.ebi.ac.uk/inc/js/contents.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://www.ebi.ac.uk/inc/css/sidebars.css" type="text/css" />
<link rel="SHORTCUT ICON" href="http://www.ebi.ac.uk/bookmark.ico" />
<style type="text/css">
@media print {
body, .contents, .header, .contentsarea, .head {
position: relative;
}
}
</style>
<!-- InstanceBeginEditable name="head" -->
<!-- start meta tags, css , javascript here -->
<!-- end meta tags, css , javascript here -->
<!-- InstanceEndEditable -->
</head>
<body onload="if(navigator.userAgent.indexOf('MSIE') != -1) {document.getElementById('head').allowTransparency = true;}">
<div class="headerdiv" id="headerdiv" style="position:absolute; z-index: 1;">
<iframe src="/inc/head.html" name="head" id="head" frameborder="0" marginwidth="0px" marginheight="0px" scrolling="no" width="100%" style="position:absolute; z-index: 1; height: 57px;">Your browser does not support inline frames or is currently configured not to display inline frames. Content can be viewed at actual source page: http://www.ebi.ac.uk/inc/head.html</iframe>
</div>
<div class="contents" id="contents"><table class="contentspane" id="contentspane" summary="The main content pane of the page"><tr><td class="leftmargin"><img src="http://www.ebi.ac.uk/inc/images/spacer.gif" class="spacer" alt="spacer" /></td><td class="leftmenucell" id="leftmenucell">
<div class="leftmenu" id="leftmenu" style="width: 145px; visibility: visible; display: block;">
<!-- InstanceBeginEditable name="leftnav" -->
<!-- start left menu here -->
<script type="text/javascript" src="/inc/js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#commonheader").load("header.html");
$("#leftmenu").load("/~jherrero/left_menu.html" ,function() {
$("#courses").addClass("clickmeopen");
}
);
// Prepend title in "title.txt" if it exists
title = document.title;
$('#doctitle').load("title.txt", '', function(data) {
if ($(this).text() != title) {
document.title = $(this).text() + " - " + title
}
});
});
</script>
<!-- end left menu here -->
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="lefticons" -->
<!-- InstanceEndEditable -->
<script type="text/javascript" src="http://www.ebi.ac.uk/inc/js/sidebars.js"></script>
<img src="http://www.ebi.ac.uk/inc/images/spacer.gif" class="spacer" alt="spacer" /></div></td><td class="contentsarea" id="contentsarea">
<!-- InstanceBeginEditable name="contents" -->
<!-- start contents here -->
<div id="commonheader">
<div class="breadcrumbs">
<a href="http://www.ebi.ac.uk/" class="firstbreadcrumb">EBI</a>
<a href ="http://www.ebi.ac.uk/Information/Staff/">Staff</a>
<a href="http://www.ebi.ac.uk/~jherrero/">Javier Herrero</a>
<a href="http://www.ebi.ac.uk/~jherrero/courses/">Workshops</a></div>
<h1>This workshop</h1>
<p><span class="red_bold">Date</span></p>
</div>
<h2>1. The Registry</h2>
<p></p>
<p>Create a script that uses the function load_registry_from_db to load all databases into the registry and print the names of the databases loaded.</p>
<p><b>HINT:</b> Use the verbose option.</p>
<p></p>
<h3><u>Solutions</u></h3>
<ul>
<li>Exercise 1: [<a href="solutions/core1.html">html</a>/<a href="solutions/core1.pl">text</a>] [<a href="solutions/core1.txt">output</a>]</li>
</ul>
<p></p>
<h2>2. Slices</h2>
<p></p>
<h3>a) <u>Fetch the sequence of chromosome 20 from 100,000 to 110,000</u></h3>
<ul>
<li><u>Basic</u>: Get the DNA sequence of the chromosome Slice
<br/>
<br/>
<b>HINT:</b> Fetch the Bio::EnsEMBL::Slice for this region and use the seq() method to retrieve the sequence.
<br/>
<br/>
</li>
<li><u>Advanced</u>: Write the DNA sequence of the chromosome Slice <b>to a file in FASTA format</b>
<br/>
<br/>
<b>HINT:</b> Slice objects are extended from Bio::Seq objects so can be written to file using Bio::SeqIO, i.e.
<pre> my $output = Bio::SeqIO->new( -file=>">filename" ,-format=>'Fasta' );
$output->write_seq($slice);</pre>
<br/>
</li>
<li><u>Expert</u>: Write the <b>soft-masked</b> DNA sequence of the chromosome Slice to a file in FASTA format
<br/>
<br/>
<b>HINT:</b> Use the Bio::EnsEMBL::Slice::get_repeatmasked_seq method to get the repeat-masked Slice.</li>
</ul>
<h3>b) <u>Fetch a slice for the ENSG00000101266 gene</u></h3>
<ul>
<li><u>Basic</u>: Get the the Slice for that gene
<br/>
<br/>
</li>
<li><u>Advanced/Expert</u>: Get the the Slice surronding that gene with 2kb of flanking sequence
<br/>
<br/>
<b>HINT:</b> Use the fetch_by_gene_stable_id method from the SliceAdaptor
<br/>
<br/>
<b>HINT:</b> Use the name() method from the Slice in order to get the actual location.
</li>
</ul>
<p></p>
<h3>c) <u>Determine the number of genes on the first 10MB of chromosome 20.</u></h3>
<p></p>
<p><b>HINT:</b> Fetch a Slice for that locus and get the Genes from the Slice.</p>
<h3><u>Solutions</u></h3>
<ul>
<li>Exercise 1:
<ul>
<li>Basic: [<a href="solutions/core2a_bas.html">html</a>/<a href="solutions/core2a_bas.pl">text</a>] [<a href="solutions/core2a_bas.txt">output</a>]</li>
<li>Advanced: [<a href="solutions/core2a_adv.html">html</a>/<a href="solutions/core2a_adv.pl">text</a>] [<a href="solutions/seq1.fa">output</a>]</li>
<li>Expert: [<a href="solutions/core2a_exp.html">html</a>/<a href="solutions/core2a_exp.pl">text</a>] [<a href="solutions/seq2.fa">output</a>]</li>
</ul>
</li>
<li>Exercise 2b:
<ul>
<li>Basic: [<a href="solutions/core2b_bas.html">html</a>/<a href="solutions/core2b_bas.pl">text</a>] [<a href="solutions/core2b_bas.txt">output</a>]</li>
<li>Advanced/Expert: [<a href="solutions/core2b_adv.html">html</a>/<a href="solutions/core2b_adv.pl">text</a>] [<a href="solutions/core2b_adv.txt">output</a>]</li>
</ul>
</li>
<li>Exercise 2c: [<a href="solutions/core2c.html">html</a>/<a href="solutions/core2c.pl">text</a>] [<a href="solutions/core2c.txt">output</a>]</li>
</ul>
<p></p>
<h2>3. Genes, Transcripts, Exons</h2>
<p></p>
<h3>a) <u>Fetch the gene with id 'ENSG00000101266'</u></h3>
<p>Print information about its location.</p>
<p></p>
<h3>b) <u>Get all the transcripts and proteins for the above gene</u></h3>
<ul>
<li><u>Basic</u>: For each transcript, get its location, its name and the name of the protein (if any)
<br/>
<br/>
<b>HINT:</b> Proteins are called Translations in Ensembl
<br/>
<br/>
</li>
<li><u>Advanced</u>: Also print the name of the Exons
<br/>
<br/>
</li>
<li><u>Expert</u>: and print the sequence of the proteins as well</li>
</ul>
<h3>c) <u>Get the list of the different biotypes for the genes obtained in Exercise 2c</u></h3>
<p></p>
<h3><u>Solutions</u></h3>
<ul>
<li>Exercise 3a: [<a href="solutions/core3a.html">html</a>/<a href="solutions/core3a.pl">text</a>] [<a href="solutions/core3a.txt">output</a>]</li>
<li>Exercise 3b:
<ul>
<li>Basic: [<a href="solutions/core3b_bas.html">html</a>/<a href="solutions/core3b_bas.pl">text</a>] [<a href="solutions/core3b_bas.txt">output</a>]</li>
<li>Advanced: [<a href="solutions/core3b_adv.html">html</a>/<a href="solutions/core3b_adv.pl">text</a>] [<a href="solutions/core3b_adv.txt">output</a>]</li>
<li>Expert: [<a href="solutions/core3b_exp.html">html</a>/<a href="solutions/core3b_exp.pl">text</a>] [<a href="solutions/core3b_exp.txt">output</a>]</li>
</ul>
</li>
<li>Exercise 3c: [<a href="solutions/core3c.html">html</a>/<a href="solutions/core3c.pl">text</a>] [<a href="solutions/core3c.txt">output</a>]</li>
</ul>
<h2>4. External References</h2>
<p></p>
<h3>a) <u>Fetch the ensembl gene for BRCA2</u></h3>
<p><b>HINT:</b> Use the fetch_all_by_external_name() method from the GeneAdaptor.</p>
<p></p>
<h3>b) <u>Fetch the ensembl genes for SNORA1</u></h3>
<p><b>HINT:</b> There are more than 1 gene with this name.</p>
<p></p>
<h3>c) <u>Print out all other linked database entries for the gene BRCA2.</u></h3>
<p></p>
<h3><u>Solutions</u></h3>
<ul>
<li>Exercise 4a: [<a href="solutions/core4a.html">html</a>/<a href="solutions/core4a.pl">text</a>] [<a href="solutions/core4a.txt">output</a>]</li>
<li>Exercise 4b: [<a href="solutions/core4b.html">html</a>/<a href="solutions/core4b.pl">text</a>] [<a href="solutions/core4b.txt">output</a>]</li>
<li>Exercise 4c: [<a href="solutions/core4c.html">html</a>/<a href="solutions/core4c.pl">text</a>] [<a href="solutions/core4c.txt">output</a>]</li>
</ul>
<!-- end contents here -->
<!-- InstanceEndEditable -->
<img src="http://www.ebi.ac.uk/inc/images/spacer.gif" class="spacer" alt="spacer" /></td>
<td class="rightmenucell" id="rightmenucell"><div class="rightmenu" id="rightmenu"><img src="http://www.ebi.ac.uk/inc/images/spacer.gif" class="spacer" alt="spacer" /></div></td></tr></table>
<table class="footerpane" id="footerpane" summary="The main footer pane of the page"><tr><td colspan ="4" class="footerrow"><div class="footerdiv" id="footerdiv" style="z-index:2;"><iframe src="/inc/foot.html" name="foot" frameborder="0" marginwidth="0px" marginheight="0px" scrolling="no" height="22px" width="100%" style="z-index:2;">Your browser does not support inline frames or is currently configured not to display inline frames. Content can be viewed at actual source page: http://www.ebi.ac.uk/inc/foot.html</iframe></div></td></tr>
</table>
<script src="http://www.ebi.ac.uk/inc/js/footer.js" type="text/javascript"></script>
</div>
</body>
<!-- InstanceEnd --></html>