This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Generate A Wiggle file from output fst

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

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.

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?

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.

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.

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.

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

0 answers

No answers yet.

Log in to answer this question.