Question: Reading TCGA methylation .txt files in R
gravatar for nazaninhoseinkhan
8 months ago by
Iran, Islamic Republic Of
nazaninhoseinkhan370 wrote:

Dear all,

I am trying to analyze Methylation data of cancer patients and compare them with normal samples.

Since the size of methylation data was so huge, I decided to download the entire data as .tar.gz instead of using "GDCdownload" function available in TCGABiolinks.

However I cannot find out how should I read the large number of .txt methylation files after extraction.

Any advice is appreciated


tcga methylation analysis • 431 views
ADD COMMENTlink written 8 months ago by nazaninhoseinkhan370

Open a single TXT file and then find out which column(s) that you need to retain. Then, perform the following:

  1. create a vector that contains the path of each TXT file
  2. create a loop that will pass over the contents of the vector
  3. in each loop cycle, read in the desired column(s) and bind these together into a single data-frame
ADD REPLYlink written 8 months ago by Kevin Blighe48k

Hi Kevin,

Happy new year 2019. Wishing you a prosperous year.

Thank you for your comment.

I will merge the files as you suggest me and let you know the results

ADD REPLYlink written 8 months ago by nazaninhoseinkhan370
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 887 users visited in the last hour