Hi, all I read a data from wig file with import.wig function of rtracklayer package. The class() of this data showed :"UCSCdata". I am failed to write the data to other format with "write.table/csv(XXX,file="XX",sep=" ")". Could you tell me which funtion/methods can convert the data to other format(.txt, .csv or excel)?
Question: How to convert the data from .wig file to .table or .csv?
1
wql_zcq • 40 wrote:
ADD COMMENT
• link
•
modified 4.8 years ago
by
Alex Reynolds ♦ 31k
•
written
4.8 years ago by
wql_zcq • 40
1
Sukhi Singh ♦ 10k wrote:
Use export.wig from rtracklayer
with dataFormat
to BED
. BED format is text based.
0
anwesha.ghosh.btech • 10 wrote:
Does this bed format contain the signal intensity column?
This question is not directly related to parent thread. You should have asked it in a new thread.
As indicated in this link BED format is plain text and only requires three columns by default (chromosome, chromStart, chromEnd). You could include signal intensity as an optional additional column.
0
Alex Reynolds ♦ 31k wrote:
You can convert to BED with wig2bed. BED is a tab-delimited text file:
$ wig2bed < in.wig > out.bed
From there, you can bring it into Excel and re-save as CSV, if you need a different delimiter.
Add the --keep-header
option if you want that metadata in the output.
Please log in to add an answer.
Use of this site constitutes acceptance of our User
Agreement
and Privacy
Policy.
Powered by Biostar
version 2.3.0
Traffic: 2111 users visited in the last hour