How is the connection made between chromosomes in karyotype and synteny file?
Closed this issue · 2 comments
Hi,
Thank you for the nice RIdeogram software. It is indeed difficult to find good and easy to use software for plotting synteny between 2 linear maps. This is what I hope that Rideogram can do.
I got the examples to work and also got some of my own data into a 2 way synteny plot.
I wonder how the connection is made between chromosomes in karyotype and synteny file?
In the the example code (also shown below) Roman numerals are used to identify the chromosomes in the karyotype file. In my own file I used chrX and lgX in this file. I am comparing a genetic and physical map.
In the synteny file normal (Arabic) numerals are used, and also required, otherwise the software runs into an error.
How does Rideogram know on which chromosome from the karytype file a line from the synteny file should be plotted? The chromosome names don't match up.
Is it also possible to manually line up the order of chromosomes between 2 maps?
For example I know that chr1 corresponds to lg7 in my case, and the plot would be much nicer if chr1 and lg7 are direct below/above each other. Maybe even better with a straight instead of a curved line. Some chromosomes / linkage group maps could also be flipped, to get them in the same orientation (this is something that I also could do manually of course).
Thank you.
data(karyotype_dual_comparison, package="RIdeogram")
head(karyotype_dual_comparison)
#> Chr Start End fill species size color
#> 1 I 1 23037639 969696 Grape 12 252525
#> 2 II 1 18779884 969696 Grape 12 252525
#> 3 III 1 19341862 969696 Grape 12 252525
#> 4 IV 1 23867706 969696 Grape 12 252525
#> 5 V 1 25021643 969696 Grape 12 252525
#> 6 VI 1 21508407 0ab276 Grape 12 252525
table(karyotype_dual_comparison$species)
#>
#> Grape Populus
#> 19 19
data(synteny_dual_comparison, package="RIdeogram")
head(synteny_dual_comparison)
#> Species_1 Start_1 End_1 Species_2 Start_2 End_2 fill
#> 1 1 12226377 12267836 2 5900307 5827251 cccccc
#> 2 15 5635667 5667377 17 4459512 4393226 cccccc
#> 3 9 7916366 7945659 3 8618518 8486865 cccccc
#> 4 2 8214553 8242202 18 5964233 6027199 cccccc
#> 5 13 2330522 2356593 14 6224069 6138821 cccccc
#> 6 11 10861038 10886821 10 8099058 8011502 cccccc
If someone else runs into the same issue I found out how the connection is made.
The numbers in the Species_1
and Species_2
columns of the synteny_dual_comparison
files are just index numbers that point to the chromosomes defined for the 2 species defined in the karyotype_dual_comparison
file.
To change the order of the chromosomes in the visualization, change the order of the chromosomes defined in the karyotype_dual_comparison
file. And update the values in the Species_1
and Species_2
columns of the synteny_dual_comparison
file accordingly.
@TickingClock1992 I think it would be more user friendly to connect to the chromosomes in the karyotype_dual_comparison
by name instead of by index.
Thanks for suggestion. It is much easier to match these two files by index in the script. The 'Chr' column in karyotype file is just the name of corresponding chromosome while the row count corresponds to the chromosome number. And 'Species_1' and 'Species_2' columns in synteny file correspond to the chromosome numbers in their own species.
In your case, you just need to put the lg7 in the first line of linkage group with 'Chr' being filled in 'lg7'. And in synteny file, using '1' in 'Species_1' to represent the 'chr1' and '1' in 'Species_2' to represent the 'lg7'. I think it will work in this way. And thanks for the suggestion again. I will try to make it more friendly for users in the next version.