22. Adapting R2 to your needs¶
Or how you can optimize R2 for your specific data analysis
- This tutorial describes the adaptable settings within R2. These are basically all items under the My Settings menu-item. Through these you can personalize the use of R2
- First a couple of regular settings will be treated: changing colors, setting parameters
- Next we’ll delve into the practical adaptation of R2; uploading your dataset, adding your personal genesets (categories), creating/exporting /uploading your own tracks and maintaining a user community
22.2. Step 1: Adapt your settings¶
Personalizing R2 starts with selecting the My Settings menu item (Figure 1). First item under there is the general ‘My Settings’; choose that.
In the User Defined Settings window several parameters for analyses in R2 can be adapted to your preferences. For most analyses these are set to appropriate values, but of course you want to set your favorite dataset here!
Next item in the My Settings submenu are the ‘Megasampler Presets’ (Figure 1), these are of relevance when you’ve built a specific Preset in an analysis Across Datasets. ( (chapter: Multiple datasets overview with Megasampler).
The ‘Upload New Dataset’-, ‘Categories’-, ‘Tracks’- and ‘Communities’-menu-items will be elaborated further upon later in this tutorial. The ‘Timeseries colors’ allows you to set the colors for the graphs of specific experiments in a series (Figure 3).
22.3. Step 2: Upload your data¶
The extensive functionality of R2 can be best experienced when you have your own data available. In order to do so it first has to be uploaded and processed. Click the Upload New Dataset (Figure 1), the upload form appears (Figure 4). This has to be filled out according to MIAME guidelines as (amongst others) used at the gene expression database GEO (http://www.ncbi.nlm.nih.gov/geo/info/MIAME.html). If you have any specific annotations or wishes or microarray samples other than Affymetrix you’d best contact r2 support directly (firstname.lastname@example.org). If you would like to see a publicly accessible dataset in R2, then send an email to email@example.com with a link to the microarray data, or in the case of a Gene Expression Omnibus dataset, the GSE**** identifier, and we will take care of the rest and send a notification email.
22.4. Step 3: Create your own genesets; a.k.a. categories¶
Another way in which R2 can be adapted to your specific needs is by introducing your own set of genes, which are called categories in R2; hover over the ‘Category’-item and select ‘Build Category’ (Figure 5)
The ‘Custom Category’ window pops up (Figure 6). Default this is set to upload from a text file formatted as a single column of official gene symbols (obtained from NCBI gene). The uploaded data can be stored temporary (24 hrs) or in your personal tracks database. We’re now going to use the input text field for data upload. Select the ‘Input Box’ option in the ‘how’ dropdown box and select ‘personal track’ in the ‘Where’ dropdown.
The input box allows you to paste a bunch of genes to upload as a category for use in analyses in R2. In the example a set of genes, mutated in tumors are pasted. Selecting the ‘personal track’ option guarantees that this set will remain available for you (for people in your community, see later in this tutorial). Click “next” to upload the set (Figure 7), you’ll receive a message when everything has succeeded. Your set of genes is now available as a Category for all analyses within R2. Go back to the main page to see where you can use this set.
We’re going to lookup your category, an example is available in the GeneSet view. In the main menu in Field 3 select ‘View a Geneset’ and click “next”( Figure 8)
In the GeneSetView your Category is privately available for yourself for similar analyses as with any other public geneset present in R2. Select My GeneCategories to choose from your categories (currently only one of course) #: and click Next (Figure 9).
In the next window you can specify which geneset you want to view. The Category ‘Changed Genes’ we just made above is now available (Figure 10). For now we end here, later on we’ll see the category again in the context of #:Tracks.
We now return to the My Settings menu to find out how we can manage the categories we just build. From the My Settings menu hover over ‘Categories’ and click ‘Manage Categories’.
The Category Manager (Figure 11) allows you to keep track of the categories; sets of genes you’ve stored within R2. Existing Categories can be adapted or deleted. New Categories can be based on existing ones, and to keep track of large amounts of categories these can be stored in collections. As an example we’re going to update the Category we just made. Click the ‘Copy/Delete/Rename/Edit Categories’ button.
In the next screen you’ll be asked what type of procedure is needed for your category of choice; in our case we want to keep the category and update it. Select it and click ‘Execute’.
The details of the Category we built in the former steps are available for adaptation. In this way you can keep track and adapt the sets you use for your analyses
22.5. Step 4: Tracks in R2: create your own data annotation¶
Another important feature in R2 that can be adapted to your needs is the Tracks feature. Tracks in R2 give you the opportunity to divide your samples in groups for further analysis. They can be created as a result of analyses within R2 and stored, or you can create them yourself based on sample characteristics. We’ll first start with a K-means analysis that results in a division of the samples in two groups, for more about this analysis see the available tutorials on this subject) . On the main page of R2 select the K-means analysis in Field 3 (Figure 14)
In the settings window for the K-means analysis (Figure 15) you can choose the Category created above to cluster the current set of samples. In our case this is called stud06-ChangedGenes. Set the number of draws to 10x10, click ‘next’
The resulting clustering in two groups might not be ultimately convincing (Figure 16), but for our testing purposes this is alright. What is important is that the resulting groups can be stored as a track; click the button ‘store as a track’.
R2 now shows all samples as a long table with radio buttons indicating which group each sample belongs to. These can be adapted if you want to. Scroll down the window to find the fields that have to be set in order to store this as a track (Figure 17). You may want to change the group names into something more informative, and potentially also change the name to something you could easily relate to.
Clicking the Build set button will store this as a track. In the custom tracks manager we can adapt this track again. From the My Settings menu select ‘Manage Custom Tracks’ (Figure 18).
In the next screen keep the default selection; your current dataset. Tracks are, of course, defined based on a specific dataset; for each dataset you can store your own tracks. Click ‘Continue’.
In the next screen you’re able to adapt the Track we just generated. Of interest in here is the option “drawtrack”, which will result in the display of the information underneath the YY-plots. The tracks can also be assigned to collections to make large sets of tracks manageable. We leave the deletion of the track to the imagination of the reader. Now we’ll pay attention to the default tracks for this dataset. Figure 20: The track we just generated can be adapted from here. For a start set the Drawtrack propery to ‘yes’; we want to see this track in the graphs we create!
Select Manage Default Tracks from the My Settings menu (Figure 21)
In the next screen the dataset has to be defined; keep the defaults and click Continue. You’ll end up in the Default Tracks Manager (Figure 22). Basically all annotation provided with this dataset is available as a track, we’ll select the additional annotations of gender and recurrence as visible, they’ll show up in further analyses. Be sure to click the ‘Update Tracks’ button for these changes to take effect. When collections of tracks are used these we’ll show up conveniently as separate groups of tracks under the graph.
22.6. Step 5: Upload your own tracks¶
R2 also allows you to build your own tracks from scratch. You’ll be able to assign each sample to a group of your choice. To illustrate this select ‘Build Custom Track’ in ‘My Settings’ (Figure 21). The Custom Track window appears. R2 also provides the possibility to upload a custom track from a prefab text file; we’ll shortly show this; click ‘Upload a Track’ (Figure 23).
In the Upload Custom Track window you can either select a tab delimited txt file built with a tool like Excel, or alternatively paste tab or semicolon delimited text in the paste-box; that provides R2 with the proper assignment of each sample to a specific value. Based on that, R2 creates the groups for you. Using this procedure you can create tracks with as many groups as you like. If you intend to create a track with a limited number of groups, then an easier way is provided through the user interface, which we will now try. Click back button in your browser to return to Figure 23
In the Custom Track window(Figure 23) the number of groups desired has to be given in advance. We try 3. The Gene/PS option allows you to order the samples based on the expression of a gene, and make sub-groups that range in expression. Leave that field open and click Submit
In the next window a convenient grouping of all annotation parameters and there values is available to create groups. In this example we select the low grade(1,2,3) vs high grade(4) vs special (4s) tumor types in the Neuroblastoma dataset as known from the INSS classification. Tick the appropriate boxes in the appropriate group columns. It is also convenient to recapitulate the resulting groups in a separate column so tick that box also (Figure 25).
Click “next”, all samples appear in a table with check boxes to assign them to the appropriate group. Scroll down to create the annotation for these groups (). Names have been adapted, show track is set to yes, the track is set to be stored a personal track and colors per group have been adapted. Click ‘Build set’ to store the set, you’ll receive a message accordingly in the next window. Of course you now finally want to see all our track manipulation in an actual graph. Go to the R2 main page again to see how the data of a gene will be plotted using the new tracks.
- A frequently used approach is using a track based on bins of values. To avoid labour intensive excel usage you can also use the expression treshhold option from the pulldown menu. Each time an expression level has been entered, a new box is generated for the next value. Click next to save the track.
Select View a gene in groups in Field 3 of the main page, type MYCN as gene name in Field 4 (Figure 27). Click ‘next’.
The track created in the Custom Track manager is available for selection: u-lowgradvs4vs4s. Note that the other Track created in the K-means analysis, is also available here. Choose it and click ‘Next’.
The different groups we created as part of our track in the previous steps are available for selection. We want to see them all, keep the settings and click ‘Next’.
The expression of MYCN is plotted in the different groups of the track that was created (Figure 30). Note that the other track of mutated genes has a large overlap with the stage 4 group. There is also overlap with the “recurrence_or_progression” Default Track that we set to visible.
Another convenient option from the “custom track manager” is the export function which enables you to manipulate your tracks manually outside R2. This could be of use when your want to share tracks with other users or create new custom tracks. One reason you want to use the export function is to fix the ordering of your sample when generating a heatmap (see Error: Reference source not found) . Make sure you already have a personal custom track (Not a temporary track, 24h ). Select Manage default Tracks from the My Settings menu (Figure 21) and click next. Here select the dataset of interest , only datasets which have a corresponding personalized track are represented in the pulldown menu. Click the “Copy/delete/rename/export Tracks” button. Here select the personal track , “export” operation and r2_track at “export as” . Click execute” and download link with the track name can be loaded by clicking the right mouse button.
22.7. Step 6: Cooperate through R2: sharing tracks, creating communities¶
Cooperation is of great importance in scientific research. You probably want to share the tracks created above with other people in your group. For this reason R2 features the Communities. Creating a community is done by clicking ‘Community’ in the ‘My Settings’ menu (Figure 31).
Since this will be the first time in the community section, there are no communities yet; click the ‘Start a new Community’ link (Figure 32).
In the Community window a name has to be set and a short description for people invited as members for this group (Figure 33). Through a community you can share GeneCategories, Tracks and Settings.
Click ‘Next’; you’ll be notified that the group has been created; return to the Communities Center by clicking the Community link again in the My Settings menu (Figure 32). The TestGroup has been created (next to the already existing MyTestGroup for this user). Click the link to start adding users (Figure 35).
You have to add users by their R2 username; we’ll add user “pietmolenaar”. He’ll receive a message in the R2 startup page as soon as he logs on the next time. Click “next” to add the user.
R2 returns with a message that the user has been invited, he or she has to accept your invitation first before he will see what you are sharing.
The perspective of the invited user after logon; he or she can accept the invitation (Figure 37).
When the invitation has been accepted the user is available in this community. When we add a category, track or preset the next time, it is possible to make this available to this community.
When a Category is created there is now a possibility to make it available to a Community (Figure 39)
Managing the tracks, gene categories and megasampler presets is done in a similar way as has been shown in the user tracks and user categories at the beginning of this tutorial. pietmolenaar, as a member of this group, can manage the tracks that have been shared with him via his default track manager
22.8. Final remarks / future directions¶
Some of these functionalities have been developed recently. If you run into any quirks or annoyances don’t hesitate to contact r2 support (firstname.lastname@example.org).
We hope that this tutorial has been helpful, the R2 support team.