abyzovlab / CNVpytor

a python extension of CNVnator -- a tool for CNV analysis from depth-of-coverage by mapped reads
MIT License
179 stars 26 forks source link

Issue with command for generating #154

Closed saint7007 closed 1 year ago

saint7007 commented 1 year ago

Hi team, tried this command,

cnvpytor -root some.pytor -view 10000 < script.spytor as given in document it give me this error,

python3.7/site-packages/cnvpytor/viewer.py", line 2683, in circular for c, (l, t) in self.reference_genome["chromosomes"].items(): TypeError: 'NoneType' object is not subscriptable this is in my, script.spytor `$ cat script.spytor

set rd_use_mask set markersize 1 set grid vertical set output_filename prefix.png manhattan circular`

Same error for plain command as well ,

cnvpytor -root some.pytor -view 100000 <<ENDL set rd_use_mask set markersize 1 set grid vertical set output_filename prefix.png manhattan circular ENDL

Can you tell me what is the missing piece?

arpanda commented 1 year ago

Could you try the same after removing the circular statement. I would like to confirm its due to circular statement or not.

Thank You Arijit

saint7007 commented 1 year ago

cnvpytor -root some.pytor -view 1000 < script.spytor Traceback (most recent call last): File "/home/x/x/lib/python3.7/site-packages/cnvpytor/viewer.py", line 508, in prompt self.parse(f + [str(self.bin_size)]) File "/home/x/x/lib/python3.7/site-packages/cnvpytor/viewer.py", line 377, in parse self.global_plot() File "/home/x/x/lib/python3.7/site-packages/cnvpytor/viewer.py", line 2460, in global_plot for c, (l, t) in self.reference_genome["chromosomes"].items(): TypeError: 'NoneType' object is not subscriptable

removed

cat script.spytor set rd_use_mask set markersize 1 set grid vertical set output_filename prefix.png manhattan

yes tried same error.

arpanda commented 1 year ago

You are using multiple bin sizes. Did you processed your file with those bin sizes. Also could you please share the reference genome name.

ls command will have those details. could you please share the output of the ls command. cnvpytor -root some.pytor -ls

-Arijit

saint7007 commented 1 year ago

here it is

cnvpytor -root some.pytor -ls

Filename some.pytor
------------------------------------
File created: 2022-11-03 19:30 using CNVpytor ver 1.2.1

Chromosomes with RD signal: 

Chromosomes with SNP signal: 

Reference genome is not set.

Chromosomes with RD histograms [bin sizes]:  []

Chromosomes with SNP histograms [bin sizes]:  []

Chromosome lengths: {}
arpanda commented 1 year ago

The file is empty for both rd and snp signal.

Here is an example of a ls command. Here, both, rd and snp, data are present.

Filename 'NA12877.pytor'
------------------------
File created: 2020-07-21 23:11 using CNVpytor ver 1.0

Chromosomes with RD signal: chrM, chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr21, chr22, chrX, chrY

Chromosomes with SNP signal: chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr21, chr22, chrX, chrY

Using reference genome: hg19 [ GC: yes, mask: yes ]

Chromosomes with RD histograms [bin sizes]: chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr1, chr20, chr21, chr22, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chrM, chrX, chrY [100000]

Chromosomes with SNP histograms [bin sizes]: chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr1, chr20, chr21, chr22, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chrX, chrY [100000]

Chromosome lengths: {'chrM': '16571', 'chr1': '249250621', 'chr2': '243199373', 'chr3': '198022430', 'chr4': '191154276', 'chr5': '180915260', 'chr6': '171115067', 'chr7': '159138663', 'chr8': '146364022', 'chr9': '141213431', 'chr10': '135534747', 'chr11': '135006516', 'chr12': '133851895', 'chr13': '115169878', 'chr14': '107349540', 'chr15': '102531392', 'chr16': '90354753', 'chr17': '81195210', 'chr18': '78077248', 'chr19': '59128983', 'chr20': '63025520', 'chr21': '48129895', 'chr22': '51304566', 'chrX': '155270560', 'chrY': '59373566'}

If any one set of data is empty, then that section should look like.

Chromosomes with {data type} histograms [bin sizes]:  []

For manhattan plot, rd data should present in the pytor file.