jtlovell / GENESPACE

Other
180 stars 24 forks source link

Plot_Riparian error during run_genespace #119

Closed nhartwic closed 9 months ago

nhartwic commented 1 year ago

I'm currently doing a run with 8 plant genomes. It seemed like eveyrthing was working, but I encountered the following error.

Error in rbindlist(mclapply(synhitFiles, mc.cores = nCores, function(j) {: Item 3 of input is not a data.frame, data.table or list
Traceback:

1. run_genespace(gpar)
2. plot_riparian(gsParam = gsParam, useRegions = TRUE, refGenome = i, 
 .     pdfFile = plotf)
3. phase_blks(gsParam = gsParam, refGenome = refGenome, useRegions = useRegions, 
 .     blkSize = gsParam$params$blkSize, synBuff = gsParam$params$synBuff, 
 .     refChr = NULL, refStartBp = NULL, refEndBp = NULL)
4. rbindlist(mclapply(synhitFiles, mc.cores = nCores, function(j) {
 .     h <- subset(read_synHits(j), isAnchor)
 .     if (!all(is.na(h$regID)) && useRegions) {
 .         h[, `:=`(blkID, regID)]
 .     }
 .     h <- h[, hcols, with = F]
 .     h <- subset(h, complete.cases(h))
 .     h <- merge(rh2, h, by = "ofID2", allow.cartesian = T, all.y = T)
 .     h <- merge(rh1, h, by = "ofID1", allow.cartesian = T, all.y = T)
 .     anchs <- subset(h, refChr1 == refChr2)
 .     anchs <- subset(anchs, complete.cases(anchs))
 .     anchs[, `:=`(n, .N), by = c("chr1", "chr2", "blkID", "refChr1")]
 .     anchs[, `:=`(tord1 = frank(ord1, ties.method = "dense"), 
 .         tord2 = frank(ord2, ties.method = "dense")), by = "blkID"]
 .     if (nrow(anchs) < blkSize) {
 .         bc <- NULL
...
 .         bc <- calc_blkCoords(anchs, mirror = T)
 .         bc[, `:=`(c("refChr", "blkID"), tstrsplit(blkID, "=refChr_XXX_"))]
 .     }
 .     return(bc)
 . }))

...Here is the contents of my working directory...

.
├── bed
│   ├── atrichopoda.bed
│   ├── b73.bed
│   ├── btx623.bed
│   ├── col0.bed
│   ├── nipponbare.bed
│   ├── ta1014.bed
│   ├── westar.bed
│   └── williams82.bed
├── dotplots
│   ├── atrichopoda_vs_atrichopoda.rawHits.pdf
│   ├── atrichopoda_vs_atrichopoda.syntenicHits.pdf
│   ├── b73_vs_atrichopoda.rawHits.pdf
│   ├── b73_vs_atrichopoda.syntenicHits.pdf
│   ├── b73_vs_b73.rawHits.pdf
│   ├── b73_vs_b73.syntenicHits.pdf
│   ├── b73_vs_btx623.rawHits.pdf
│   ├── b73_vs_btx623.syntenicHits.pdf
│   ├── b73_vs_col0.rawHits.pdf
│   ├── b73_vs_col0.syntenicHits.pdf
│   ├── b73_vs_nipponbare.rawHits.pdf
│   ├── b73_vs_nipponbare.syntenicHits.pdf
│   ├── b73_vs_ta1014.rawHits.pdf
│   ├── b73_vs_ta1014.syntenicHits.pdf
│   ├── btx623_vs_atrichopoda.rawHits.pdf
│   ├── btx623_vs_atrichopoda.syntenicHits.pdf
│   ├── btx623_vs_btx623.rawHits.pdf
│   ├── btx623_vs_btx623.syntenicHits.pdf
│   ├── btx623_vs_col0.rawHits.pdf
│   ├── btx623_vs_col0.syntenicHits.pdf
│   ├── btx623_vs_ta1014.rawHits.pdf
│   ├── btx623_vs_ta1014.syntenicHits.pdf
│   ├── col0_vs_atrichopoda.rawHits.pdf
│   ├── col0_vs_atrichopoda.syntenicHits.pdf
│   ├── col0_vs_col0.rawHits.pdf
│   ├── col0_vs_col0.syntenicHits.pdf
│   ├── nipponbare_vs_atrichopoda.rawHits.pdf
│   ├── nipponbare_vs_atrichopoda.syntenicHits.pdf
│   ├── nipponbare_vs_btx623.rawHits.pdf
│   ├── nipponbare_vs_btx623.syntenicHits.pdf
│   ├── nipponbare_vs_col0.rawHits.pdf
│   ├── nipponbare_vs_col0.syntenicHits.pdf
│   ├── nipponbare_vs_nipponbare.rawHits.pdf
│   ├── nipponbare_vs_nipponbare.syntenicHits.pdf
│   ├── nipponbare_vs_ta1014.rawHits.pdf
│   ├── nipponbare_vs_ta1014.syntenicHits.pdf
│   ├── ta1014_vs_atrichopoda.rawHits.pdf
│   ├── ta1014_vs_atrichopoda.syntenicHits.pdf
│   ├── ta1014_vs_col0.rawHits.pdf
│   ├── ta1014_vs_col0.syntenicHits.pdf
│   ├── ta1014_vs_ta1014.rawHits.pdf
│   ├── ta1014_vs_ta1014.syntenicHits.pdf
│   ├── westar_vs_atrichopoda.rawHits.pdf
│   ├── westar_vs_atrichopoda.syntenicHits.pdf
│   ├── westar_vs_b73.rawHits.pdf
│   ├── westar_vs_b73.syntenicHits.pdf
│   ├── westar_vs_btx623.rawHits.pdf
│   ├── westar_vs_btx623.syntenicHits.pdf
│   ├── westar_vs_col0.rawHits.pdf
│   ├── westar_vs_col0.syntenicHits.pdf
│   ├── westar_vs_nipponbare.rawHits.pdf
│   ├── westar_vs_nipponbare.syntenicHits.pdf
│   ├── westar_vs_ta1014.rawHits.pdf
│   ├── westar_vs_ta1014.syntenicHits.pdf
│   ├── westar_vs_westar.rawHits.pdf
│   ├── westar_vs_westar.syntenicHits.pdf
│   ├── westar_vs_williams82.rawHits.pdf
│   ├── westar_vs_williams82.syntenicHits.pdf
│   ├── williams82_vs_atrichopoda.rawHits.pdf
│   ├── williams82_vs_atrichopoda.syntenicHits.pdf
│   ├── williams82_vs_b73.rawHits.pdf
│   ├── williams82_vs_b73.syntenicHits.pdf
│   ├── williams82_vs_btx623.rawHits.pdf
│   ├── williams82_vs_btx623.syntenicHits.pdf
│   ├── williams82_vs_col0.rawHits.pdf
│   ├── williams82_vs_col0.syntenicHits.pdf
│   ├── williams82_vs_nipponbare.rawHits.pdf
│   ├── williams82_vs_nipponbare.syntenicHits.pdf
│   ├── williams82_vs_ta1014.rawHits.pdf
│   ├── williams82_vs_ta1014.syntenicHits.pdf
│   ├── williams82_vs_williams82.rawHits.pdf
│   └── williams82_vs_williams82.syntenicHits.pdf
├── orthofinder
│   └── Results_Aug09
│       ├── Citation.txt
│       ├── Comparative_Genomics_Statistics
│       ├── Gene_Duplication_Events
│       ├── Gene_Trees
│       ├── Log.txt
│       ├── Orthogroup_Sequences
│       ├── Orthogroups
│       ├── Orthologues
│       ├── Phylogenetic_Hierarchical_Orthogroups
│       ├── Phylogenetically_Misplaced_Genes
│       ├── Putative_Xenologs
│       ├── Resolved_Gene_Trees
│       ├── Single_Copy_Orthologue_Sequences
│       ├── Species_Tree
│       └── WorkingDirectory
├── pangenes
│   ├── atrichopoda_integratedSynPos.txt
│   ├── b73_integratedSynPos.txt
│   ├── btx623_integratedSynPos.txt
│   ├── col0_integratedSynPos.txt
│   ├── nipponbare_integratedSynPos.txt
│   ├── ta1014_integratedSynPos.txt
│   ├── westar_integratedSynPos.txt
│   └── williams82_integratedSynPos.txt
├── peptide
│   ├── atrichopoda.fa
│   ├── b73.fa
│   ├── btx623.fa
│   ├── col0.fa
│   ├── nipponbare.fa
│   ├── ta1014.fa
│   ├── westar.fa
│   └── williams82.fa
├── results
│   ├── Blast0_0.txt.gz
│   ├── Blast0_1.txt.gz
│   ├── Blast0_2.txt.gz
│   ├── Blast0_3.txt.gz
│   ├── Blast0_4.txt.gz
│   ├── Blast0_5.txt.gz
│   ├── Blast0_6.txt.gz
│   ├── Blast0_7.txt.gz
│   ├── Blast1_0.txt.gz
│   ├── Blast1_1.txt.gz
│   ├── Blast1_2.txt.gz
│   ├── Blast1_3.txt.gz
│   ├── Blast1_4.txt.gz
│   ├── Blast1_5.txt.gz
│   ├── Blast1_6.txt.gz
│   ├── Blast1_7.txt.gz
│   ├── Blast2_0.txt.gz
│   ├── Blast2_1.txt.gz
│   ├── Blast2_2.txt.gz
│   ├── Blast2_3.txt.gz
│   ├── Blast2_4.txt.gz
│   ├── Blast2_5.txt.gz
│   ├── Blast2_6.txt.gz
│   ├── Blast2_7.txt.gz
│   ├── Blast3_0.txt.gz
│   ├── Blast3_1.txt.gz
│   ├── Blast3_2.txt.gz
│   ├── Blast3_3.txt.gz
│   ├── Blast3_4.txt.gz
│   ├── Blast3_5.txt.gz
│   ├── Blast3_6.txt.gz
│   ├── Blast3_7.txt.gz
│   ├── Blast4_0.txt.gz
│   ├── Blast4_1.txt.gz
│   ├── Blast4_2.txt.gz
│   ├── Blast4_3.txt.gz
│   ├── Blast4_4.txt.gz
│   ├── Blast4_5.txt.gz
│   ├── Blast4_6.txt.gz
│   ├── Blast4_7.txt.gz
│   ├── Blast5_0.txt.gz
│   ├── Blast5_1.txt.gz
│   ├── Blast5_2.txt.gz
│   ├── Blast5_3.txt.gz
│   ├── Blast5_4.txt.gz
│   ├── Blast5_5.txt.gz
│   ├── Blast5_6.txt.gz
│   ├── Blast5_7.txt.gz
│   ├── Blast6_0.txt.gz
│   ├── Blast6_1.txt.gz
│   ├── Blast6_2.txt.gz
│   ├── Blast6_3.txt.gz
│   ├── Blast6_4.txt.gz
│   ├── Blast6_5.txt.gz
│   ├── Blast6_6.txt.gz
│   ├── Blast6_7.txt.gz
│   ├── Blast7_0.txt.gz
│   ├── Blast7_1.txt.gz
│   ├── Blast7_2.txt.gz
│   ├── Blast7_3.txt.gz
│   ├── Blast7_4.txt.gz
│   ├── Blast7_5.txt.gz
│   ├── Blast7_6.txt.gz
│   ├── Blast7_7.txt.gz
│   ├── N0.tsv
│   ├── Orthogroups.tsv
│   ├── SequenceIDs.txt
│   ├── SpeciesIDs.txt
│   ├── SpeciesTree_rooted.txt
│   ├── atrichopoda__v__b73.tsv
│   ├── atrichopoda__v__btx623.tsv
│   ├── atrichopoda__v__col0.tsv
│   ├── atrichopoda__v__nipponbare.tsv
│   ├── atrichopoda__v__ta1014.tsv
│   ├── atrichopoda__v__westar.tsv
│   ├── atrichopoda__v__williams82.tsv
│   ├── b73__v__atrichopoda.tsv
│   ├── b73__v__btx623.tsv
│   ├── b73__v__col0.tsv
│   ├── b73__v__nipponbare.tsv
│   ├── b73__v__ta1014.tsv
│   ├── b73__v__westar.tsv
│   ├── b73__v__williams82.tsv
│   ├── btx623__v__atrichopoda.tsv
│   ├── btx623__v__b73.tsv
│   ├── btx623__v__col0.tsv
│   ├── btx623__v__nipponbare.tsv
│   ├── btx623__v__ta1014.tsv
│   ├── btx623__v__westar.tsv
│   ├── btx623__v__williams82.tsv
│   ├── col0__v__atrichopoda.tsv
│   ├── col0__v__b73.tsv
│   ├── col0__v__btx623.tsv
│   ├── col0__v__nipponbare.tsv
│   ├── col0__v__ta1014.tsv
│   ├── col0__v__westar.tsv
│   ├── col0__v__williams82.tsv
│   ├── combBed.txt
│   ├── nipponbare__v__atrichopoda.tsv
│   ├── nipponbare__v__b73.tsv
│   ├── nipponbare__v__btx623.tsv
│   ├── nipponbare__v__col0.tsv
│   ├── nipponbare__v__ta1014.tsv
│   ├── nipponbare__v__westar.tsv
│   ├── nipponbare__v__williams82.tsv
│   ├── syntenicBlock_coordinates.csv
│   ├── syntenicRegion_coordinates.csv
│   ├── ta1014__v__atrichopoda.tsv
│   ├── ta1014__v__b73.tsv
│   ├── ta1014__v__btx623.tsv
│   ├── ta1014__v__col0.tsv
│   ├── ta1014__v__nipponbare.tsv
│   ├── ta1014__v__westar.tsv
│   ├── ta1014__v__williams82.tsv
│   ├── westar__v__atrichopoda.tsv
│   ├── westar__v__b73.tsv
│   ├── westar__v__btx623.tsv
│   ├── westar__v__col0.tsv
│   ├── westar__v__nipponbare.tsv
│   ├── westar__v__ta1014.tsv
│   ├── westar__v__williams82.tsv
│   ├── williams82__v__atrichopoda.tsv
│   ├── williams82__v__b73.tsv
│   ├── williams82__v__btx623.tsv
│   ├── williams82__v__col0.tsv
│   ├── williams82__v__nipponbare.tsv
│   ├── williams82__v__ta1014.tsv
│   └── williams82__v__westar.tsv
├── riparian
├── syntenicHits
│   ├── atrichopoda_vs_atrichopoda.allBlast.txt.gz
│   ├── atrichopoda_vs_atrichopoda.synHits.txt.gz
│   ├── b73_vs_atrichopoda.allBlast.txt.gz
│   ├── b73_vs_atrichopoda.synHits.txt.gz
│   ├── b73_vs_b73.allBlast.txt.gz
│   ├── b73_vs_b73.synHits.txt.gz
│   ├── b73_vs_btx623.allBlast.txt.gz
│   ├── b73_vs_btx623.synHits.txt.gz
│   ├── b73_vs_col0.allBlast.txt.gz
│   ├── b73_vs_col0.synHits.txt.gz
│   ├── b73_vs_nipponbare.allBlast.txt.gz
│   ├── b73_vs_nipponbare.synHits.txt.gz
│   ├── b73_vs_ta1014.allBlast.txt.gz
│   ├── b73_vs_ta1014.synHits.txt.gz
│   ├── btx623_vs_atrichopoda.allBlast.txt.gz
│   ├── btx623_vs_atrichopoda.synHits.txt.gz
│   ├── btx623_vs_btx623.allBlast.txt.gz
│   ├── btx623_vs_btx623.synHits.txt.gz
│   ├── btx623_vs_col0.allBlast.txt.gz
│   ├── btx623_vs_col0.synHits.txt.gz
│   ├── btx623_vs_ta1014.allBlast.txt.gz
│   ├── btx623_vs_ta1014.synHits.txt.gz
│   ├── col0_vs_atrichopoda.allBlast.txt.gz
│   ├── col0_vs_atrichopoda.synHits.txt.gz
│   ├── col0_vs_col0.allBlast.txt.gz
│   ├── col0_vs_col0.synHits.txt.gz
│   ├── nipponbare_vs_atrichopoda.allBlast.txt.gz
│   ├── nipponbare_vs_atrichopoda.synHits.txt.gz
│   ├── nipponbare_vs_btx623.allBlast.txt.gz
│   ├── nipponbare_vs_btx623.synHits.txt.gz
│   ├── nipponbare_vs_col0.allBlast.txt.gz
│   ├── nipponbare_vs_col0.synHits.txt.gz
│   ├── nipponbare_vs_nipponbare.allBlast.txt.gz
│   ├── nipponbare_vs_nipponbare.synHits.txt.gz
│   ├── nipponbare_vs_ta1014.allBlast.txt.gz
│   ├── nipponbare_vs_ta1014.synHits.txt.gz
│   ├── ta1014_vs_atrichopoda.allBlast.txt.gz
│   ├── ta1014_vs_atrichopoda.synHits.txt.gz
│   ├── ta1014_vs_col0.allBlast.txt.gz
│   ├── ta1014_vs_col0.synHits.txt.gz
│   ├── ta1014_vs_ta1014.allBlast.txt.gz
│   ├── ta1014_vs_ta1014.synHits.txt.gz
│   ├── westar_vs_atrichopoda.allBlast.txt.gz
│   ├── westar_vs_atrichopoda.synHits.txt.gz
│   ├── westar_vs_b73.allBlast.txt.gz
│   ├── westar_vs_b73.synHits.txt.gz
│   ├── westar_vs_btx623.allBlast.txt.gz
│   ├── westar_vs_btx623.synHits.txt.gz
│   ├── westar_vs_col0.allBlast.txt.gz
│   ├── westar_vs_col0.synHits.txt.gz
│   ├── westar_vs_nipponbare.allBlast.txt.gz
│   ├── westar_vs_nipponbare.synHits.txt.gz
│   ├── westar_vs_ta1014.allBlast.txt.gz
│   ├── westar_vs_ta1014.synHits.txt.gz
│   ├── westar_vs_westar.allBlast.txt.gz
│   ├── westar_vs_westar.synHits.txt.gz
│   ├── westar_vs_williams82.allBlast.txt.gz
│   ├── westar_vs_williams82.synHits.txt.gz
│   ├── williams82_vs_atrichopoda.allBlast.txt.gz
│   ├── williams82_vs_atrichopoda.synHits.txt.gz
│   ├── williams82_vs_b73.allBlast.txt.gz
│   ├── williams82_vs_b73.synHits.txt.gz
│   ├── williams82_vs_btx623.allBlast.txt.gz
│   ├── williams82_vs_btx623.synHits.txt.gz
│   ├── williams82_vs_col0.allBlast.txt.gz
│   ├── williams82_vs_col0.synHits.txt.gz
│   ├── williams82_vs_nipponbare.allBlast.txt.gz
│   ├── williams82_vs_nipponbare.synHits.txt.gz
│   ├── williams82_vs_ta1014.allBlast.txt.gz
│   ├── williams82_vs_ta1014.synHits.txt.gz
│   ├── williams82_vs_williams82.allBlast.txt.gz
│   └── williams82_vs_williams82.synHits.txt.gz
└── tmp
    ├── atrichopoda.fa
    ├── b73.fa
    ├── btx623.fa
    ├── col0.fa
    ├── nipponbare.fa
    ├── ta1014.fa
    ├── westar.fa
    └── williams82.fa

I'm happy to share any files that would be helpful for debugging this issue. Here is my stdout which includes genespace version

GENESPACE v1.3.1: synteny and orthology constrained comparative
        genomics

Checking Working Directory ... PASS: `~/BIO/workflows/testdata/genespace_test/wkdir/`
Checking user-defined parameters ...
    Genome IDs & ploidy ... 
        atrichopoda: 1
        b73        : 1
        btx623     : 1
        col0       : 1
        nipponbare : 1
        ta1014     : 1
        westar     : 1
        williams82 : 1
    Outgroup ... NONE
    n. parallel processes ... 6
    collinear block size ... 5
    collinear block search radius ... 25
    n gaps in collinear block ... 5
    synteny buffer size... 100
    only orthogroups hits as anchors ... TRUE
    n secondary hits ... 0
Checking annotation files (.bed and peptide .fa):
    atrichopoda: 26846 / 26846 geneIDs exactly match (PASS)
    b73        : 39498 / 39498 geneIDs exactly match (PASS)
    btx623     : 34129 / 34129 geneIDs exactly match (PASS)
    col0       : 27655 / 27655 geneIDs exactly match (PASS)
    nipponbare : 42189 / 42189 geneIDs exactly match (PASS)
    ta1014     : 38736 / 38736 geneIDs exactly match (PASS)
    westar     : 97514 / 97514 geneIDs exactly match (PASS)
    williams82 : 52872 / 52872 geneIDs exactly match (PASS)
Checking dependencies ...
    Found valid path to OrthoFinder v2.55: `orthofinder`
    Found valid path to DIAMOND2 v2.18: `diamond`
    Found valid MCScanX_h executable: `/home/nol/BIO/outside/MCScanX//MCScanX_h`

Once again, please let me know if there is anything else I can do to help debug this.

jtlovell commented 11 months ago

Sorry about the delayed response - were you able to figure it out? This error usually happens where there is very little synteny

nhartwic commented 10 months ago

No. I moved onto other stuff.

There probably isn't much synteny here. The test includes monocots and dicots, so the family is something like a hundred million years diverged and includes something like a half a dozen unique genome duplication events and reductions. I suppose I'll do another test with lower diversity and see what happens.

jtlovell commented 9 months ago

Yeah - the monocot-dicot divergence is enough that synteny isn't really useful for ... anything. If you have issues within one of those groups, lmk.