User:Pisanu Buphamalai/Notebook/TF affininties vs nuleosome affinities/2011/09/21

From OpenWetWare
Jump to: navigation, search
Owwnotebook icon.png TF affinities vs nucleosome affinities Report.pngMain project page
Resultset previous.pngPrevious entry      

Decompress and join files

  • The data was split into 4 files, so they are needed to merge together.

1. Decompress the zip file

2. Copy files (tf_binding_vs_nuc_hap1_...) to the working directory of R. The working directory is the folder where R is located, typically in folder 'bin'. However, it can be changed by setting in menu bar: file>>chage dir...>>(select the new directory)

Here are some functions about working directory (wd) Within R, use the functions getwd to determine the current working directory, setwd to change the current working directory, and dir to list the files in the current working directory. [1]

3. Once the files are already in current wd, import them to the console windows. Here is the function I used.


R> a <- read.table("tf_binding_vs_nuc_hap1_a") \\ Read the data in the file named in "", and set it in the parameter a. R> b <- read.table("tf_binding_vs_nuc_hap1_b") R> c <- read.table("tf_binding_vs_nuc_hap1_c") R> d <- read.table("tf_binding_vs_nuc_hap1_d")

R> total <- rbind(a,b,c,d) \\merge these data by row *there is some errors(the message represented on the console), but I found nothing*

R> write.crv(total, file="tf_binding_vs_nuc_hap1") \\ Write the data in total to the file .csv


Now I joined the files, it's very large! (27xxx kB with only texts and digits)