broadinstitute / PhylogicNDT

Other
70 stars 39 forks source link

SinglePatientTiming: get_arm_level_cn_events #55

Open iS4i4S opened 3 years ago

iS4i4S commented 3 years ago

Hello,

Thanks for developing the tool. I was able to run without problems the 'Cluster' module for 39 samples individually (each sample separately) using the code: ./PhylogicNDT.py Cluster -i ${i} -sif /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/${i}_input.sif -rb --maf_input_type calc_ccf --impute --use_indels -drv /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/Drivers.txt

Where the maf input was: Hugo_Symbol Chromosome Start_position Reference_Allele Tumor_Seq_Allele2 t_ref_count t_alt_count local_cn_a1 local_cn_a2 TRIM62 chr1 33147403 G A 54 28 4 0

The Sif is as follows: sample_id maf_fn seg_fn purity timepoint CNSL002T /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/CNSL002T.txt 0.567749795730953 0

Then I try to run 'SinglePatientTiming' for each sample as follows: for i in CNSL002T; do /home/user/PhylogicNDT/PhylogicNDT.py SinglePatientTiming -i ${i} -sif /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/${i}_input_SinglePatientTiming.sif -drv /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/Drivers.txt; done The .sif file is as follows:

sample_id maf_fn seg_fn purity timepoint CNSL002T /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/CNSL002T.mut_ccfs.txt /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/CNSL002T_SegFile.txt 0.567749795730953 0

Where the "CNSL002T.mut_ccfs.txt" is the result from the 'Cluster' module and the 'CNSL002T_SegFile' has the following format: Chromosome Start End A1.Seg.CN A2.Seg.CN 1 782094 1637096 5 0

I get the following error: for i in CNSL030T; do /home/user/PhylogicNDT/PhylogicNDT.py SinglePatientTiming -i ${i} -sif /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/${i}_input_SinglePatientTiming.sif -drv /media/user/Seagate_Exome67_133/LIGUE/WES_analysis_R/MOVICS/Ordering_mutations/CS1/Input/Drivers.txt; done /home/user/PhylogicNDT/phylogicndt.log Traceback (most recent call last): File "/home/user/PhylogicNDT/PhylogicNDT.py", line 515, in <module> args.func(args) File "/home/user/PhylogicNDT/SinglePatientTiming/SinglePatientTiming.py", line 50, in run_tool timing_engine = TimingEngine.TimingEngine(patient_data, min_supporting_muts=args.min_supporting_muts) File "/home/user/PhylogicNDT/SinglePatientTiming/TimingEngine.py", line 42, in __init__ self.get_arm_level_cn_events() File "/home/user/PhylogicNDT/SinglePatientTiming/TimingEngine.py", line 166, in get_arm_level_cn_events clonal_concordance = np.prod(cluster_ccfs[1][sample_idx, ccf_idx]) KeyError: 1

Any idea what is causing it?

Thanks in advance

Littlefoxfairy commented 2 years ago

hi, i meet the sample problem with you, have you ever solved this problem?

miaoyx-SHTU commented 1 year ago

Perhaps changing the items of "Chromosome" column in the seg_fn input (as requested in the sif file) from "chr1" to "1" might help.

I tried this, and it worked fine.

It seems like some kind of bug in source code when reading seg_fn as python dict form. Please forgive me for not remembering the details, as it has been a long time since I last worked on this.

cocoMA2020 commented 1 year ago

chang the items of "Chromosome" column in the seg_fn and maf inputs (as requested in the sif file) from "chr1" to "1"

Salaheddinekacimi commented 1 year ago

facing the same issue and I tried without chr in Chromosome.

676lql commented 2 months ago

facing the same issue and I tried without chr in Chromosome.

me too T T. may i ask is there any updates?