Comments (12)
Hi Laura,
I can't access the data of the graphic
- you need to save it into .csv
- you need to put it into the data folder
- In your R code you need to import these data
from lncrna_bc.
Hi laura
To import .csv files you have to do this
name_df <- read.csv("name_your_file.csv")
from lncrna_bc.
Hi Cris,
The command to export a table is:
write.csv(table_in_R$columns, "name.csv")
from lncrna_bc.
Hi! I've already uploaded the .csv file
and also I corrected the script. Thank you!!
from lncrna_bc.
May be you can check this if you have header and others considers:
ERROR: Nine number changed by )
read.table(file, header = FALSE, sep = "", quote = ""'"9
TRUE:
read.table(file, header = FALSE, sep = "", quote = ""'")
from lncrna_bc.
Hi! I've indicated the header but I don't know how to indicate rownames... help!
from lncrna_bc.
https://github.com/opetchey/RREEBES/wiki/Reading-data-and-code-from-an-online-github-repository
How to upload a file in R from Github
from lncrna_bc.
Hi! I added a line in the script,
VPSol <- data.frame(BCresultsNR$log2FoldChange, BCresultsNR$sig, row.names = rownames(BCresultsNR)) ##Creates a data frame with coordinates##
This generates a data frame with coordinates data. For colors, I would like to categorize data following this:
Color 1: $log2FC > 1.5, $sig <0.05
Color 2: $log2FC < -1.5, $sig <0.05
Color 3: $log2FC > 1.5, $sig > 0.05
Color 4: $log2FC < -1.5, $sig >0.05
Color 5: 0 < $log2FC< 1.5, $sig > 0.05
Color 6: -1.5 < $log2FC < 0
Thanks!!!
from lncrna_bc.
Hi Laura
I have the answer, you have to do this:
##Rename the columns to simplify the dataframe##
VPSol <- VPSol %>% rename(FoldChange = BCresultsNR.log2FoldChange, p_value = BCresultsNR.sig)
##Create a column with colors depending on the value of Fold Change and p-value##
VPSol$color <- ifelse((VPSol$FoldChange > 1.5) & (VPSol$p_value < 0.05), "Col_1",
ifelse((VPSol$FoldChange < -1.5) & (VPSol$p_value < 0.05), "Col_2",
ifelse((VPSol$FoldChange > 1.5) & (VPSol$p_value > 0.05), "Col_3",
ifelse((VPSol$FoldChange < -1.5) & (VPSol$p_value > 0.05), "Col_4",
ifelse((VPSol$FoldChange < 1.5) & (VPSol$p_value > 0.05), "Col_5", "Col_6")))))
##Create plot##
ggplot(VPSol, aes(x=FoldChange, y=p_value)) +
geom_point(aes(colour = color))
I can run it on my computer, I hope you can also run it. In ggplot we can put the lines to divide the grid, but I don't know how to you want it.
from lncrna_bc.
Hi Laura
I finally found a way to upload the dataframe in R from GitHub!
# upload the csv file
# the first column need to have a name - I modified the csv file by adding "sample" on the first column
# the link need to be the raw data by clicking "view raw"
library (readr)
urlfile="https://raw.githubusercontent.com/LauraMCE/lncRNA_BC/master/Transcriptome/Data_1_Diff_genes.csv"
BCData<-read_csv(url(urlfile))
# transform the table into a dataframe, indicating that the first column is the row names
BCData <- as.data.frame(BCData)
rownames(BCData) <- BCData[, 1]
BCData <- BCData[, -1]
#verify that the data are correct
head(BCData)
row.names(BCData)
colnames(BCData)
It works on my computer. Try on your own and if it works, modify the code in Github so that everyone can access the data and make the graphic.
Good job everyone, we are getting close!
from lncrna_bc.
Hi Laura,
Don't forget to reply and if no further issues occur, close the issue!
from lncrna_bc.
Hi, @camillethuyentruong ! The code you provided me worked perfectly, and it is already uploaded in the code. Thanks!
Hi, @cristoichkov ! Thanks for the script. I did some changes that you can see here, but... It worked!! I have now a very nice Volcano Plot with a lot of colors. Thanks everybody @VeroIarrachtai @camillethuyentruong for helping me!!
from lncrna_bc.
Related Issues (20)
- Modify stadistic parameters to implement GSEA Analysis on DESEq results HOT 2
- Evaluation 30 October HOT 7
- Modify General README HOT 1
- Describe STB HOT 1
- Transcriptome project: Explain code of meta HOT 1
- Complete Choco and GSEA HOT 1
- Transcriptome: Results folder HOT 1
- Adding exome pipeline in R HOT 1
- Add meta folder to Transcriptome
- Add link to GENCODE HOT 1
- Upload exome files HOT 1
- Update scripts Exome HOT 1
- Preliminary evaluation HOT 8
- Scripts in transcriptome HOT 1
- Put data on OSF HOT 1
- Add README to Exome HOT 1
- Add Plots in R (Results) HOT 1
- Add discussion file HOT 1
- Update locations in issues HOT 1
- final repo evaluation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lncrna_bc.