Question: Extract a chromosome from a WIG file
0
gravatar for Grinch
3 months ago by
Grinch20
Germany
Grinch20 wrote:

I have a large WIG files which are difficult to run in IGV, due to the size. I am only interested in chromosome M so I would like to extract signal from that chromosome and thus have a smaller file size. I found one solution on Stackoverflow (https://stackoverflow.com/questions/17354962/pcregrep-a-wiggle-file-to-extract-chromosome-multiple-line-regex-search), but that doesn't work at all. Any other ideas? I check UCSC utils and extensively searched online. I am also open to suggestions on bedgraph or similar formats.

wig • 185 views
ADD COMMENTlink modified 11 weeks ago by EagleEye6.0k • written 3 months ago by Grinch20

but that doesn't work at all

Please specify what doesn't work.

The awksolution on stackoverflow looks fine to me.

fin swimmer

ADD REPLYlink written 3 months ago by finswimmer7.9k

It produces an empty file. I checked with grep and the chromosome exists in the original file.

ADD REPLYlink written 3 months ago by Grinch20
2
gravatar for Pierre Lindenbaum
3 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum115k wrote:

use one of the tools provided by the UCSC to extract a region of the chromosome : http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/

for example bigWigToWig :

   -chrom=chr1 - if set restrict output to given chromosome
   -start=N - if set, restrict output to only that over start
   -end=N - if set, restict output to only that under end
   -udcDir=/dir/to/cache - place to put cache for remote bigBed/bigWigs

and then convert back to bigwig with wigToBigWig

ADD COMMENTlink written 3 months ago by Pierre Lindenbaum115k

Thank you. I knew there had to be a simple solution like this available.

ADD REPLYlink written 3 months ago by Grinch20
0
gravatar for EagleEye
11 weeks ago by
EagleEye6.0k
Sweden
EagleEye6.0k wrote:

Try IGV 'toTDF' to convert your 'WIG' files into binary tiled data (TDF). This loads into IGV lot faster than 'WIG' files.

ADD COMMENTlink modified 11 weeks ago • written 11 weeks ago by EagleEye6.0k
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: 1700 users visited in the last hour