Question: How to convert the data from .wig file to .table or .csv?
1
gravatar for wql_zcq
3.0 years ago by
wql_zcq40
wql_zcq40 wrote:

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)?

chip-seq next-gen R • 1.9k views
ADD COMMENTlink modified 3.0 years ago by Alex Reynolds28k • written 3.0 years ago by wql_zcq40
1
gravatar for Sukhdeep Singh
3.0 years ago by
Sukhdeep Singh9.7k
Netherlands
Sukhdeep Singh9.7k wrote:

Use export.wig from rtracklayer with dataFormat to BED. BED format is text based.

ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by Sukhdeep Singh9.7k
0
gravatar for anwesha.ghosh.btech
3.0 years ago by
anwesha.ghosh.btech10 wrote:

Does this bed format contain the signal intensity column?

ADD COMMENTlink written 3.0 years ago by anwesha.ghosh.btech10

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.

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by genomax65k
0
gravatar for Alex Reynolds
3.0 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k 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.

ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by Alex Reynolds28k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 818 users visited in the last hour