Posts

Showing posts with the label bioinformatics

Make a list of values that belong to each region

Image
Clash Royale CLAN TAG #URR8PPP Make a list of values that belong to each region I have a little trouble in R. I'm pretty new R users. So I have a dataframe which looks like that (but much more longer) : My first problem is that my file have no header, I upload my file with this command : My_data=read.table("/home/toto/test.bed",sep="t", dec=".",fill=TRUE,header = FALSE) And after try to make a header like that names(My_data)=c("chr", "start","end","Region_type","Region_id") But when I want to take a column My_column<-My_data$Region_type It does not work. So I must to do like that : My_column<-My_data[,4] But I don't understand why the header doesn't work... My second problem is that I'm trying to make a list of all the clones (clone is represented by chrX Start-End) that belong to each region (MACS_peak_xxx). To do this I tried something like that : region_list <- levels(My_data[,4]...