jtlovell / GENESPACE

Other
180 stars 24 forks source link

Plot riparian not the same as dot plots or previous runs of genespace #131

Closed trm76056 closed 2 months ago

trm76056 commented 9 months ago

Hello,

I've been using this program for a bit now and have really enjoyed its output and visualization, especially with the newer releases.

I've gotten updated annotations for two genomes I'm wanting to visualize and thusly had to re-run GENESPACE. For some reason, however, the riparian plot looks completely different and I can't seem to figure out why. There are no inversions showing up, when we know that there are at least three (this is based off of other work including visualization alignments). Previous runs of the program produced synteny maps that showed these structural variants, but now that I've re-run it, they're not. I've triple checked that the bed and peptide files are correct, and I've taken a look at the dotplots folder produced, and these show the expected inverted regions. There seems to be some disconnect happening with the plot_riparian function, where those inverted regions are not being recognized. I've played around with the plot_riparian function, using default parameters as well as others to see if there is something there that could cause it to look different, but these plots all output the same thing (a synteny plot where the inversions are not there).

Do you have any suggestions for why this might be the case? I haven't had this problem before, and am not sure what could be causing the issue. The code I am using as well as headers of the input files are below if that helps.

wd <- "/scratch/trm76056/Inversions/RNASeq_Files/ASE_analysis/GENESPACE/"
gpar <- init_genespace(
        genomeIDs = c("SR","ST"),
        wd = wd,
        ploidy = 1,
        path2mcscanx = "/apps/eb/MCScanX/20221031-GCC-11.3.0/")
out <- run_genespace(gpar,overwrite = F)
ripDat <- plot_riparian(gsParam = out,
        refGenome = "ST",
        pdfFile = "ST_SR_genespace_retry.pdf")

Bed file example: SR_BE 0 3484 SR_g5627.t1 SR_BE 3518 4380 SR_g5628.t1 SR_BE 32744 46302 SR_g5629.t1 SR_BE 48855 49942 SR_g5630.t1 SR_BE 50899 52319 SR_g5631.t1

Peptide file example:

SR_g5627.t1 MFFAGKLKSAGISCSQKLHGIQRSHWQRVSPLYQQFQDGHTGNVSVLLKNHLQL VQRTGNAFDITKIPTLPGAGPNMMAPAQQILPRFLNLDDTWNTIWTHWQRGPIS QTQSKCVCQLYTGHSTLNTFAKCPTYIHLQLQTATTNRLGAAANNHFCDAANNS WENLLKITFVMHCNFLQLSRTQLFGNKNQTLPALDPTRGFSAANPSWLFNRDDT

jtlovell commented 9 months ago

Do you see the inversions in the dotplot? you might also try useRegions = FALSE, which will give you all the blocks, instead of averaging over small inversions.

trm76056 commented 9 months ago

I added that command and that allowed me to see one of the inverted regions, but the other two on another chromosome were not present. These inversions are all seen in the dotplots that are made by GENESPACE, as well as other programs for alignment/synteny mapping.

jtlovell commented 9 months ago

So, to be clear, you have an inverted syntenic block in the dotplots (has its own color) and in the blkCoords file (orient = "-"), but it is not showing up in the riparian plot? This sounds problematic. I guess you should try running plot_riparian without coloring by reference genome (col = "grey") ... this will be a direct plot of the blk coordinates - if your inversion is its own block, it will be shown for sure.

trm76056 commented 9 months ago

That is correct. I ended up rerunning with some other data with closely related genomes, and we still aren't seeing those inverted regions. I have pasted two pictures showing the old run of genespace where its showing the correct synteny and the newer run where its showing stuff incorrectly. Nothing was changed about these runs, other than using the updated version to allow for manipulation of the visualization since this new version has more options available (re: regions of interest, which is the ultimate goal) Synteny_X.pdf this is the older version of genespace that shows the correct synteny. Across other programs (mummer, mauve, etc) we see this same synteny so we believe it is correct Testaceas_nochange_X.pdf this is using the new version where you can see synteny is not the same.

jtlovell commented 7 months ago

Sorry about the delayed response - were you able to resolve this? I am not sure what is going on and will need to run it on my side to figure it out.