tanghaibao / jcvi

Python library to facilitate genome assembly, annotation, and comparative genomics
BSD 2-Clause "Simplified" License
738 stars 187 forks source link

correlation plot phyical distance to genetic distance #71

Closed MichelMoser closed 6 years ago

MichelMoser commented 7 years ago

Hello Haibao,

Could you tell me how i can draw correlation plots per chromosome but for a single map and not all the maps which were used for chromosome construction in ALLMAPS?

Could i just parse the bed-file for only markers from a single map and run

python -m jcvi.assembly.allmaps plot single_map.bed chr1

Also, do i need to be worried if some linkage groups of my genetic maps get distributed over other chromosomes? Is some sort of clean-up necessary before merging them? What is your experience? (see attached pdf)

chrchr1.pdf

Thank you, Michel

tanghaibao commented 7 years ago

@MichelMoser That's a really busy plot. I would first clean up the plot with parameter --links=LINKS (in this case, say --links=30).

MichelMoser commented 7 years ago

Hi, thanks for the quick answer. Looks better already. Is there an easy hack for the inputdata to get single maps plotting physical vs genetic distance? I saw that genetic_maps.agp gets loaded, so i might just change this, or is the script actually considering several files?

tanghaibao commented 7 years ago

@MichelMoser I had a plotting routine that I used for the paper and converted into a cli command. I have tested it on a small test data but haven't tested extensively on other datasets. Here is the command:

$ python -m jcvi.assembly.allmaps plotratio JM-2 chr23 JMFemale-23

Then on the test data. It generates the following figure: plotratio