GWAS summary statistic
1
0
Entering edit mode
20 months ago

summary statistic • 1.2k views
0
Entering edit mode

Please explain better the data that you have. 'Summary statistic' is quite general. From where did you download it?; what does it contain?

0
Entering edit mode

0
Entering edit mode

0
Entering edit mode

I guess you're not a linux user. Is this question IT related or biology related?

0
Entering edit mode

I am using Putty. The question is computational biology related.

0
Entering edit mode

I uncompressed the summary statistics and am trying to read it into R but it keeps popping up error messages.

This is the command I used;

setwd("C:/Users/Hp/Downloads/DBPannotated.csv")
data = read.table("DBPannotated.txt", sep = "\t")


This is the output;

Error in file(file, "rt") : cannot open the connection
In file(file, "rt") :
cannot open file 'DBPannotated.txt': No such file or directory


0
Entering edit mode

Thank you. Why are you you running this:

setwd("C:/Users/Hp/Downloads/DBPannotated.csv")


Do you have a directory named DBPannotated.csv or is that the file that you need to read [into R]?

Why do you then try to read a file with a 'txt' extension (DBPannotated.txt)?

A few questions:

• what is the file that you want to read, and where is it located (full path)?
• what is the output of getwd() when you open R?

Thank you!

0
Entering edit mode

Yes I have a Directory called DBPannoted.csv (I have just removed the .csv extension from the directory name).

The file was initially .txt.gz extension so I used WINzip to uncompressed it, and it was changed to .txt file.

1) The file I want to read was DBPannotated.txt (renamed to DBPannotated.csv) and the location to the full path is ("C:/Users/Hp/Downloads/DBPannotated.csv"), where DBPannoted.csv has been changed to DBPannotated.

2). getwd()

NB Even after I renamed both the file path directory and the file extensions it still gave me the same error output. I need assistance on how to go about it.

0
Entering edit mode

I see!

list.files('.', full = TRUE)


What does it output?

0
Entering edit mode
> list.files('.', full = TRUE)
[1] "./Circular-Manhattan.P.jpg"
[2] "./Circular-Manhattan.trait1.trait2.trait3.jpg"
[3] "./DBPannotated.csv.Rproj"
[4] "./DBPannotated.csv.txt"
[5] "./DBPannotated.txt.gz"
[6] "./MANHATTAN TUTORIAL.R.RData"
[7] "./Rplot.png"
[8] "./Rplot01.png"
[9] "./Rplot02.png"
[10] "./Rplot03.png"
[11] "./Rplot04.png"
[12] "./Rplot05.png"
[13] "./Rplot06.png"
[14] "./SBPannotated.txt"
[15] "./SBPannotated.txt.gz"
>


Those are my files in that directory

0
Entering edit mode

I see... in that case, this will work:

data = read.table("DBPannotated.csv.txt", sep = "\t")

0
Entering edit mode

OK. I tried:

data = read.table("SBPannotated.txt",sep = "\t")


and it worked. It is currently loading now and no more error message. Thanks a lot.

I have another challenge, I tried generating manhattan plot using MTAR package example data but the script I have to plot Manhattan plot is not compatible with their dataset since I need SNP,CHR and BP values to plots manhattan plot. The MTAR package dataset doesn't have those columns. Any idea on how to generate manhattan plots from MTAR result?

0
Entering edit mode

Which columns do you have?

0
Entering edit mode

I cant view my columns cos the file is too large to view so I wanted to read it into R first before viewing it. Or do you have an idea on how to view such large files?

0
Entering edit mode

But you have already read the file into R, as the object data? So, just type:

colnames(data)


Let me know if that works!

0
Entering edit mode

It is still loading. I dont know why it is taking so long.

0
Entering edit mode

colnames(data) NULL

0
Entering edit mode
str(data)


?

0
Entering edit mode
str(data)
function (..., list = character(), package = NULL, lib.loc = NULL, verbose = getOption("verbose"),
envir = .GlobalEnv, overwrite = TRUE)

0
Entering edit mode

So, it was not even able to read in the data (to R).

What was the output of

data = read.table("SBPannotated.txt",sep = "\t")


It looks like you are using Windows? - Windows is terrible for working with large datasets.

0
Entering edit mode

Ya you are right. Windows is very poor for large data and my data is around 7gb size. I have navigated to Linux. Hopefully it will run faster.

0
Entering edit mode

I am an MSc student in Bioinformatics, am currently doing my Master's project now and am working on GWAS analysis to detect SNPs that are associated with Hypertension. I will appreciate if I can get your Email address or Skype info. so I can be able to easily reach to you cos there is a limitation of messages per day on BIOSTAR. I need a supervisor who is good in Bioinformatics and currently my supervisor is not within reach and I only get through to him once in a week. I would appreciate your assistance. Thanks.

0
Entering edit mode
20 months ago

Please take a look at the examples in the vignette: Multi-trait analysis of rare-variant association summary statistics using MTAR

Use gunzip to uncompress your *..txt.gz file, and then read it into R via read.table(), read.csv(), or some other read function. Note that, depending on your version of R, these basic read functions can detect compressed data and uncompress those 'on the fly' for you.

Kevin

0
Entering edit mode

I uncompress the file and I still tried reading it to R but it still shows same error message:

data = read.csv("SBPannotated",sep = "\t")
Error in file(file, "rt") : cannot open the connection
In file(file, "rt") :
cannot open file 'SBPannotated': No such file or directory