raphael-group / THetA

Tumor Heterogeneity Analysis (THetA) and THetA2 are algorithms that estimate the tumor purity and clonal/subclonal copy number aberrations directly from high-throughput DNA sequencing data. This repository includes the updated algorithm, called THetA2.
http://compbio.cs.brown.edu/projects/theta/
71 stars 33 forks source link

AttributeError: 'module' object has no attribute 'MOVBBirthMergeAlg' #19

Open ycl6 opened 6 years ago

ycl6 commented 6 years ago

I installed THetA and bnpy using source files from github, but encounter this error:

/tools/THetA/bin/RunTHetA tumor.interval_count \
--TUMOR_FILE tumor.snp_formatted.txt --NORMAL_FILE normal.snp_formatted.txt \
--BAF --NUM_PROCESSES `nproc` --FORCE
Reading in query file...
Frac with potential copy numbers: 0.0734379924922
Reading SNP file at tumor.snp_formatted.txt
Reading SNP file at normal.snp_formatted.txt
Reading interval file at tumor.interval_count
Calculating BAFs
Determining heterozygosity.
Calculating BAFs.
First round of clustering...
Traceback (most recent call last):
  File "/tools/THetA/bin/../python/RunTHetA.py", line 514, in <module>
    main()
  File "/tools/THetA/bin/../python/RunTHetA.py", line 291, in main
    resultsfile2, boundsfile2 = run_fixed_N(2, args, intervals)
  File "/tools/THetA/bin/../python/RunTHetA.py", line 328, in run_fixed_N
    lengths, tumorCounts, normalCounts, m, upper_bounds, lower_bounds, clusterAssignments, numClusters, clusterMeans, normalInd = clustering_BAF(n, intervals=intervals, missingData=missingData, prefix=prefix, outdir=directory, numProcesses=num_processes)
  File "/tools/THetA/python/ClusteringBAF.py", line 99, in clustering_BAF
    metaData = generate_meta_data(intervals, byChrm, numProcesses, sampleName, generateData, outdir)
  File "/tools/THetA/python/ClusteringBAF.py", line 152, in generate_meta_data
    results = p.map(cluster_wrapper, zip(intervals, linearizedSampleName, linearizedChrm, linearizedGenerateData))
  File "/storage/miniconda2/lib/python2.7/multiprocessing/pool.py", line 253, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/storage/miniconda2/lib/python2.7/multiprocessing/pool.py", line 572, in get
    raise self._value
AttributeError: 'module' object has no attribute 'MOVBBirthMergeAlg'
zhouyangyu commented 5 years ago

@ycl6 You must use bnpy-dev. See https://michaelchughes@bitbucket.org/michaelchughes/bnpy-dev

simozacca commented 5 years ago

Yes, the current version of THetA only supports the bnpy-dev version of BNPY which is available here: https://bitbucket.org/michaelchughes/bnpy-dev/src/master/

There is also an easy fix that you can apply directly, please see the same topic in the HATCHet's repository at: https://github.com/raphael-group/hatchet/issues/3