Hi all,
I have build the following data frame
 head(href)
   chr tx_start   tx_end         g_id strand cds_start  cds_end exon_count
1 chr1  8384389  8404227 NM_001080397      +   8384389  8404073          8
2 chr1 16767166 16786584 NM_001145277      +  16767256 16785491          7
3 chr1 16767166 16786584 NM_001145278      +  16767256 16785385          8
4 chr1 16767166 16786584    NM_018090      +  16767256 16785385          8
5 chr1 48998526 50489626    NM_032785      -  48999844 50489468         14
6 chr1 33546713 33585995    NM_052998      +  33547850 33585783         12

Now when I'm trying to export it into a bed file I did:
output_href<- write.table(new_CTTS, file="new_href.bed", quote=FALSE, sep =
"\t", na="NA", row.names=FALSE, col.names=TRUE)

The thing is when I look at the file I only have:
 head(test)
  chr1 X564620 X564649 X564644 X565645  X94 X. X10
1 chr1  565369  565404  565371  566372  217  +   8
2 chr1  565463  565541  565480  566481 1214  +  15
3 chr1  565653  565697  565662  566663 1031  +  28
4 chr1  565861  565922  565883  566884  316  +  12
5 chr1  566537  566573  566564  567565  119  +  11
6 chr1  567535  567579  567562  568563 2085  +  39

but what I want is to include the corresponding gene ID as well in a last
column. How can I do that?

Best,
Nanami

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to