ToolsVanBox / PTATO

PTa Analysis TOolkit
MIT License
9 stars 3 forks source link

Error in 'short_variants:get_somatic_vcfs:smurf', AttributeError: 'NoneType' object has no attribute 'append' #8

Closed ssschulz closed 1 year ago

ssschulz commented 1 year ago

I get an error at the short_variants:get_somatic_vcfs:smurf, seems like some vcf, row or other object being passed into smurf is empty or otherwise not assigned properly. Is there something more specific regarding why this error is occuring and how I can fix? Bulk and non-bulk vcf files contain mutations for each sample. More detailed log file is attached.

slurm-15128053.txt

fulviodan13 commented 1 year ago

I got the same error. I think it still depend on the chromosome annotation (with prefix "chr"), just like the issue with #shapeit.

I am trying to bypass it modifing SMuRF.py by removing the line #146 chr = re.sub("chr|chrom", "", chr) but it did not work.

Do you think we need to redo the alignment using a reference without chr prefix?

Any other suggestion?

Thank you!

fulviodan13 commented 1 year ago

`bash /smurf/scripts/split_in_single_sample_vcfs.sh joint_output-hc.g.SMuRF.filtered.vcf

Command error:

File "/usr/local/lib/python3.6/multiprocessing/process.py", line 93, in run

  self._target(*self._args, **self._kwargs)

File "/smurf/SMuRF.py", line 175, in parse_chr_vcf

  record.FILTER.append('BadMQ')

AttributeError: 'NoneType' object has no attribute 'append'

Process Process-16:

Traceback (most recent call last):

File "/usr/local/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap

  self.run()

File "/usr/local/lib/python3.6/multiprocessing/process.py", line 93, in run

  self._target(*self._args, **self._kwargs)

File "/smurf/SMuRF.py", line 171, in parse_chr_vcf

  record.FILTER.append('BadQual')`
mroosmalen commented 1 year ago

Is it possible to share (a part) the input vcf file of SMuRF, so I can try to reproduce your errors and try to fix them.

fulviodan13 commented 1 year ago

Archive.zip

Thank you, Mark.

ssschulz commented 1 year ago

condensed.vcf.gz

Thanks!

mroosmalen commented 1 year ago

Thanks for sharing your data. The problem is that your vcfs don't have any data in the FILTER column. I'm working on a new lease which will fix this error (I hope). I will let you know when the new version is releasesd

fulviodan13 commented 1 year ago

Thank you, Mark.

Do you mean the initial multi-sample VCF input generated by GATK, or the one generated in the output/intermediate/germline/ directory?

I did not understand which one is the input for SMURF.

What could be the reason I do not have any value in the FILTER column?

Thanks!

mroosmalen commented 1 year ago

I mean the initial multi-sample VCF input. Did you use also GATK VariantFiltration, this should add the FILTER field to the vcf. I created a new release (v1.2.1) this version includes the new SMuRF version (3.0.2). This new version of SMuRF should be able to handle a vcf file without the FILTER field.

Can you please use the new version and let me know if it fix this issue?

domivika commented 7 months ago

Hello @fulviodan13 I see it's been a while since you worked with this tool, but could you tell me how did you manage to successfully get ab tables? In another issue I see you removed chr prefix from the input vcf file. Did you redo the alignment to the reference without the chr prefix and all the following steps such as haplotype calling etc? Thanks!