Entering edit mode
nac
▴
280
@nac-4545
Last seen 10.2 years ago
Hi,
I would like to extract a txt file of a RangedData table I have
created
with TEQC package using the get.targets function and a bed target file
"file" as an input:
> targets<-get.targets("file", chrcol=1,startcol=2,endcol=3,
zerobased=F, sep="\t",skip=0)
[1] "read 1243 target regions in total, which are collapsed to 598
non-overlapping target regions"
> targets
RangedData with 598 rows and 0 value columns across 18 spaces
space ranges |
<factor> <iranges> |
1 Chr1 [115247090, 115250671] |
2 Chr1 [115250775, 115250813] |
3 Chr1 [115251152, 115251275] |
4 Chr1 [115252190, 115252349] |
5 Chr1 [115256421, 115256599] |
6 Chr1 [115258671, 115258798] |
7 Chr1 [115259279, 115259515] |
8 Chr10 [ 89622870, 89624305] |
9 Chr10 [ 89626430, 89626806] |
... ... ... ...
590 ChrX [133607389, 133607495] |
591 ChrX [133609211, 133609394] |
592 ChrX [133620495, 133620560] |
593 ChrX [133620692, 133620696] |
594 ChrX [133624218, 133624235] |
595 ChrX [133627538, 133627620] |
596 ChrX [133632420, 133632466] |
597 ChrX [133632638, 133632714] |
598 ChrX [133634060, 133634698] |
I would like to extract the collapsed chromosome start and end points
from this to a txt file? Any suggestions would be welcome...
output file should contain:
Chr1 115247090, 115250671
Chr1 115250775, 115250813
Chr1 115251152, 115251275
.....
Many thanks,
Nat
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.