This should do it for you:
x <- read.table(textConnection("V1V2 V3
1 chr1 11255 55
2 chr1 11320 29
3 chr1 11400 45
4 chr2 21680 35
5 chr2 21750 84
6 chr2 21820 29
7 chr2 31890 46
8 chr3 32100 29
9 chr3 52380 29
10 chr3 66450 46" ), header=TRUE)
outfile <- '/tempxx.txt'
cat("browser positio
thanks Richie. It woks perfectly.
- Original Message
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: joseph <[EMAIL PROTECTED]>
Cc: r-help@r-project.org; [EMAIL PROTECTED]
Sent: Wednesday, February 6, 2008 2:22:16 AM
Subject: Re: [R] inserting text lines in a
Hi Jim
yes, this exactly want I want. However, I need one more step to get
rid of the first column so that the final file looks like this:
browser
position
chr1:1-1
browser
hide
all
track
type=wiggle_0
name=sample
description=chr1_sample
visibility=full
variableStep
chrom=chr1
span=
Try this and see if it is what you want:
x <- read.table(textConnection(" V1V2 V3
1 chr1 11255 55
2 chr1 11320 29
3 chr1 11400 45
4 chr2 21680 35
5 chr2 21750 84
6 chr2 21820 29
7 chr2 31890 46
8 chr3 32100 29
9 chr3 52380 29
10 chr3 66450 46" ), header=TRUE)
cat("browser position chr1:1-1
> I am trying to prepare a bed file to load as accustom track on the
> UCSC genome browser.
> I have a data frame that looks like the one below.
> > x
> V1V2 V3
> 1 chr1 11255 55
> 2 chr1 11320 29
> 3 chr1 11400 45
> 4 chr2 21680 35
> 5 chr2 21750 84
> 6 chr2 21820 29
> 7 chr2 31890 46
>
Hi Jim
I am trying to prepare a bed file to load as accustom track on the UCSC genome
browser.
I have a data frame that looks like the one below.
> x
V1V2 V3
1 chr1 11255 55
2 chr1 11320 29
3 chr1 11400 45
4 chr2 21680 35
5 chr2 21750 84
6 chr2 21820 29
7 chr2 31890 46
8 chr3 32100 29
9
6 matches
Mail list logo