How To Generate A Wiggle file from output fst
0
0
Entering edit mode
6.1 years ago

Hi All,

i want to generate a wiggle file from my output fst (In the following):

CHROM   BIN_START   BIN_END N_VARIANTS  WEIGHTED_FST    MEAN_FST
1   1       40000   418 0.0428711   0.0402737
1   20001   60000   434 0.0368677   0.0359379
1   40001   80000   420 0.0382382   0.0373063
1   60001   100000  368 0.0390281   0.0379922
1   80001   120000  379 0.0540822   0.0488926
1   100001  140000  358 0.0619048   0.0507374

What is the best idea?

Best Regard

Mostafa

SNP Wiggle R • 2.1k views
ADD COMMENT
1
Entering edit mode

Look up the definition of the variable step wig format here: https://genome.ucsc.edu/goldenpath/help/wiggle.html

Once you understand the definition, writing a script should be fairly easy to do.

ADD REPLY
0
Entering edit mode

Ok, I have read the details, And my output should be similar to the file below.

track type=wiggle_0 name=Fst_RJFsComs description="Fst_RJFsComs" maxHeightPixels=40:40:11 visibility=4
fixedStep chrom=chr1 start=1 step=20000
0.0911881
fixedStep chrom=chr1 start=20001 step=20000
0.105657
fixedStep chrom=chr1 start=40001 step=20000
0.115868
fixedStep chrom=chr1 start=60001 step=20000
0.101363
fixedStep chrom=chr1 start=80001 step=20000
0.0947566
fixedStep chrom=chr1 start=100001 step=20000

So, I tried to write a script but failed.

ADD REPLY
1
Entering edit mode

That's incorrect. Read the format again. No script you write will work if you don't understand the format.

ADD REPLY
1
Entering edit mode
ADD REPLY
0
Entering edit mode

We have asked you this again and again: What have you tried?

We are not just sitting here waiting for your question, please show some effort on your side to solve this. We'd be happy to point you in the right direction then.

ADD REPLY
0
Entering edit mode

Many thanks for your reply,

I first searched online, but unfortunately I did not find the same example. And when I failed to find an example script, I propound my question here. Is this wrong?

ADD REPLY
0
Entering edit mode

You will not "find the same example", you will find ideas on how to solve similar problems, that you will have to tweak to get to your solution. Could you tell us what you searched for, perhaps? The trick is in the search terms you use.

ADD REPLY
0
Entering edit mode

A start would be to search for how a wiggle looks like, and then you'll have to manipulate the data you have to obtain the data you want. 95% of bioinformatics is file format conversion.

ADD REPLY

Login before adding your answer.

Traffic: 2472 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6