Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manhattan #466

Open
diegohernansanchez opened this issue Dec 21, 2023 · 3 comments
Open

Manhattan #466

diegohernansanchez opened this issue Dec 21, 2023 · 3 comments

Comments

@diegohernansanchez
Copy link

Hi,
Not really an Issue. I was wondering if you have at hand a solution to articulate Manhattan plot data on pyGenomeTracks
Thanks
diego

@lldelisle
Copy link
Collaborator

Hi,
Could you describe a bit more what you mean by Manhattan plot and what is your input data?
Thanks,
Lucille

@diegohernansanchez
Copy link
Author

Hi Lucille,
Thanks for prompt response.
Sure, a Manhattan plot depicts association-mapping data. This is a statistical correlation between a phenotype and detected genetic polymorphisms at population level. If a particular polymorphism (say a single nucleotide polymorphism -SNP-, which is a base variant in a particular chromosomal coordinate) occurs in a fraction of the population and is significantly correlated with a phenotype, then this polymorphism is given a lower p-value. Otherwise, non-correlated SNPs present a higher p-value. Hence, a Manhattan plot depicts -log(p-values) along chromosomal coordinates (see an example in https://en.wikipedia.org/wiki/Manhattan_plot).
It would be very useful that pyGenomeTracks could handle this type of data over a genome browser, as genetic causality could be supported by comparison with additional genome-wide data such as RNA-seq, etc. The input data is simpler than a BED4, with just a single chromosomal coordinate instead of start-end. It would be a tab-delimited .txt file with columns: chromosome | position | -log(p-values). It is just needed to depict a dot in that position, with certain size and color, the latter usually depending on the chromosome number.
Thanks for your time. Cheers
diego

@lldelisle
Copy link
Collaborator

Hi,

  • For me, if you manage to convert your input file to bedgraph you can use the type = points or type = points:0.5 where you specify the point size. For example, if your input file has only 3 columns (chr | pos | -log(pval)) you can use awk to convert it:
    awk -v OFS="\t" '{print $1,$2,$2+1,$3}' input_3col.txt > output.bedgraph.
  • For the moment it is not possible to plot multiple chromosomes on the same x-axis (you need to do one plot per chromosome).
  • We do not support to automatically change color per chromosome so you would need to do a ini file per chromosome.
    Cheers,
    Lucille

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants