There is one more step so that you have the plot output as you want it - a file that you can work with to view in another program. This should open the plot viewer in bottom right, so that you can have a look at your volcano plot. Change the "TITLE OF YOUR PLOT", it is what comes out as the title on your plot. This makes a graph file called "your_volcano_plot" (change as necessary) and assigns it a bunch of features based on your column names. Plot.title = element_text(size = rel(1.5), hjust = 0.5),Īxis.title = element_text(size = rel(1.25) Geom_point(aes(x = log2FoldChange, y = -log10(padjusted), colour = threshold) You will need to change these file names each time you analyze a new file, so that you don't overwrite the data: Now, load the file into R, change the "your_file" and "file.xlsx" to something memorable for you. graphs) will be returned to the same location as your initial file - it's bad programming form, but useful for you. This should pop open a window to choose your working file and then set the working directory to where that file is, so that any outputs (e.g. ) # convert windows path to linux format for R useability, comment out for Mac users - you don't need it. You can also type/copy & paste this into the top left and then save (it is then a mini-program!)įile_user <- file.choose() # choose file for reading If you have spaces in your excel column names, either remove them, or R will replace the space with a "." when loading. You can use something like "my_file" but not "my file". Text following "#" are comments - this can contain anything, and is used to help remember what you have done and why! Also note that R doesn't like spaces in file names or titles of columns. and then loads readxl (which is used to load your file). You will need to do these lines each time you try to use this program, but once it is loaded you don't need to do it again. This loads the packages to R so it can use them. In the bottom left type (copy and paste if you prefer), then hit enter after each line if nothing happens. The command should look something like: your_file_name 0.05) in the column - remember capitals are important!). Blank cells in the file should be filled with "NA". This should open a version of the file in the top left and run some commands in the bottom left. Click on it and it'll give you some options, use the one appropriate to your file format, browse to your file, it should preview your file, then click import (bottom right). On the top right window there should be a button saying "import dataset". If you have an excel file and want to get it into Rstudio. The top left is if you want to program (which you do, so that you use the same commands to do all your analysis, and you don't have to remember exactly what you typed each time), the bottom left is the "execution" area, where the commands are run. The two on the right are for data and outputs, while the two on the left are for input commands. Once you have installed and opened, you should see 4 windows - two on the left and two on the right. If you want to go this route, get R from your local mirror, and get the desktop version of Rstudio, it will make your life easier. It helps to know that there are tons of people doing this, so you can just google the problem you have and see if it works for you. R isn't that hard - it just looks it at first.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |