Skip to content

Error when running svfinder with work_on_collection: #27

Description

@HMFAN

Hello! I encountered the following error when running svfinder with work_on_collection:
ConstantInputWarning: An input array is constant; the correlation coefficient is not defined.
return 1 - ((spearmanr(v, u)[0] + 1) / 2)
Traceback (most recent call last):
File "18.sgvFinder_4.SGVFinder_test.py", line 6, in
vsgv, dsgv = work_on_collection(
File "/miniconda3/envs/sgv-finder/lib/python3.10/site-packages/SGVFinder2/svfinder.py", line 229, in work_on_collection
sgvregions, normdf = find_sgvs(bacdf, max_spacing, vsgv_dense_perc, bacname, deldf,
File "
/miniconda3/envs/sgv-finder/lib/python3.10/site-packages/SGVFinder2/svfinder.py", line 321, in find_sgvs
sclusters = cluster_stretches(stretches, nodeldf, _spearman_dissim, dissim_thresh, 'complete')
File "/miniconda3/envs/sgv-finder/lib/python3.10/site-packages/SGVFinder2/svfinder.py", line 429, in cluster_stretches
Z = linkage(distance, method=linkage_method)
File "
/miniconda3/envs/sgv-finder/lib/python3.10/site-packages/scipy/cluster/hierarchy.py", line 1030, in linkage
raise ValueError("The condensed distance matrix must contain only finite values.")
My input files are .smp files from 9 samples.

I would greatly appreciate your help in resolving this issue. Below is my code:
DATABASE = 'sgvDB'
from SGVFinder2 import work_on_collection

vsgv, dsgv = work_on_collection(
samp_to_map='test_sgvfinder/',
max_spacing=10,
min_samp_cutoff=2,
delsdetectthresh=0.25,
real_del_thresh=0.95,
dels_cooc_thresh=0.25,
vsgv_dissim_thresh=0.125,
vsgv_clip_quantile=0.02,
vsgv_fit_interval=0.95,
vsgv_fit_method='betaprime',
x_coverage=0.01,
rate_param=10,
vsgv_dense_perc=85,
browser_path=None,
taxonomypath=DATABASE+'.taxonomy.df',
genepospath=DATABASE+'genepos.df',
frames_path=None
)
vsgv.to_csv('vsgv_example.csv')
dsgv.to_csv("dsgv_example.csv")
Thank you very much for your assistance.

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