Skip to content

Multi-copy GMP model #8

@zhongxiangSu

Description

@zhongxiangSu

您好:我在运行如下脚本时报错了:
脚本:
from models.MultiGMPmodel import MultiCopyGMPmodel
from models.MultiGGHPmodel import MultiCopyGGHPmodel
from util.calculatedCRBrateAndEstimationAccuracy import calculatedCRBrateAndEstimationAccuracy
from util.cutCircularChromosomes import cutCircularChromosomes

"""
Inferring ancestor species for Gramineae species.
Ancestor 4: Multi-copy GGHP model, result in outdutdata/Gramineae/Ancestor4
Ancestor 3: Multi-copy GMP model, result in outdutdata/Gramineae/Ancestor3
Ancestor 2: Multi-copy GMP model, result in outdutdata/Gramineae/Ancestor2
Ancestor 1: Multi-copy GMP model, result in outdutdata/Gramineae/Ancestor1

"""

please use your path

path = '/prepare/gene_filter'

workdir = path + '/finalBlocks/'

"""
Inferring ancestor species for Gramineae species.
Ancestor 2 using Multi-copy GMP model
"""
species_file_list = [
workdir + 'D_drimm.final.block',
workdir + 'G_drimm.final.block',
workdir + 'P_drimm.final.block',
]
guided_species_for_matching = workdir + 'P_drimm.final.block'
ancestor_target_copy_number = 1
outAncestor2dir = path + '/'
ancestor_name = 'AEO'
MultiCopyGMPmodel(species_file_list, outAncestor2dir, guided_species_for_matching, ancestor_name, ancestor_target_copy_number)

Evaluation

matching_target_file = workdir + 'P_drimm.final.block'
matching_target_copy_number = ancestor_target_copy_number
matching_target_name = 'P'
speciesAndCopyList = [

[workdir + 'D_drimm.final.block',ancestor_target_copy_number,'D'],
[workdir + 'G_drimm.final.block',ancestor_target_copy_number,'G'],
[workdir + 'P_drimm.final.block',ancestor_target_copy_number,'P'],

]

model_type = 'MultiCopyGMP'
calculatedCRBrateAndEstimationAccuracy(matching_target_file, matching_target_copy_number, matching_target_name,
speciesAndCopyList, outAncestor2dir, model_type)

报错:
Using license file /gpfs/hpc/home/kib_unit/leiyunting/gurobi.lic
Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64)
Thread count: 192 physical cores, 192 logical processors, using up to 32 threads
Optimize a model with 7104 rows, 11669 columns and 15001 nonzeros
Model fingerprint: 0x229938d7
Model has 1667 quadratic constraints
Model has 5001 general constraints
Variable types: 0 continuous, 11669 integer (0 binary)
Coefficient statistics:
Matrix range [1e+00, 1e+00]
QMatrix range [1e+00, 1e+00]
QLMatrix range [1e+00, 1e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+03, 1e+03]
RHS range [1e+00, 1e+00]
Presolve removed 1673 rows and 1605 columns
Presolve time: 0.00s

Explored 0 nodes (0 simplex iterations) in 0.00 seconds
Thread count was 1 (of 192 available processors)

Solution count 0

Model is infeasible
Best objective -, best bound -, gap -
Encountered an attribute error
Traceback (most recent call last):
File "orch.py", line 33, in
MultiCopyGMPmodel(species_file_list, outAncestor2dir, guided_species_for_matching, ancestor_name, ancestor_target_copy_number)
File "IAGS/models/MultiGMPmodel.py", line 29, in MultiCopyGMPmodel
adjacency_matrix = gmp.ancestor_adjacency_matrix()
File "IAGS/inferringAncestorGenomeStructure/GMP.py", line 196, in ancestor_adjacency_matrix
result.append(v.x)
File "src/gurobipy/var.pxi", line 125, in gurobipy.Var.getattr
File "src/gurobipy/var.pxi", line 153, in gurobipy.Var.getAttr
File "src/gurobipy/attrutil.pxi", line 100, in gurobipy.__getattr
AttributeError: Unable to retrieve attribute 'x'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions