-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object has no attribute 'length' in the last step, Output final VCF file #105
Comments
This is most likely a problem due to using the latest version of pyvcf. Thanks On Sun, Feb 28, 2016 at 1:41 PM, wjaratlerdsiri [email protected]
|
Got a new problem? wget https://pypi.python.org/packages/source/P/PyVCF/PyVCF-0.6.7.tar.gz Installed /bcbiometasv/miniconda/lib/python2.7/site-packages/PyVCF-0.6.7-py2.7-linux-x86_64.egg Using /usr/local/python/2.7.9/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg So, I got 2 versions drwxr-sr-x 4096 Mar 1 17:35 PyVCF-0.6.7-py2.7-linux-x86_64.egg I ran the same command as above and stopped so quick. WARNING 2016-03-01 17:55:46,800 metasv.sv_interval Skipping Record(CHROM=chrX, POS=84663964, REF=T, ALT=[TCCCCCC]) due to small size I go back to reinstall MetaSV v0.5. $ /weejar/bcbiometasv/miniconda/metasv27jan/python2.7 setup0.5.py build $/bcbiometasv/miniconda/metasv27jan/python2.7 setup0.5.py install --prefix /bcbiometasv/miniconda/ And I run MetaSV again. It runs fine until merging. I think it would end up with my original error in the last step. WARNING 2016-03-01 18:03:53,128 metasv.sv_interval Skipping Record(CHROM=chrX, POS=84663964, REF=T, ALT=[TCCCCCC]) due to small size Did I do anything wrong? Thankyou again. James |
Hang on Marghoob! When I submitted my job via qsub, the job above is still running until now, March 2nd 8am. I am sure because I have checked spades.log file. I am not sure maybe because the command above is for qsub, not for running directly. I will let you know more about this job. James |
@wjaratlerdsiri just checking if the suggestion worked for you. |
THX for the follow-up, I have to do other projects, so I moved BAM file away. I will try soon. However, if performing only merging, it worked well. I am thinking that because I used Lumpy VCF modified by SVtyper (adding more columns in the format). This might cause errors in the last VCF output. I will try again without that Lumpy-SVtyper vcf file. James, |
Sample file of Lumpy+SVtyper: #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT UP SVTYPE=DEL;SVLEN=-457;END=569844;STRANDS=+-:7;CIPOS=-5,4;CIEND=-6,4;CIPOS95=0,0;CIEND95=0,0;SU=7;PE=0;SR=7 GT:SU:PE:SR:GQ:SQ:GL:DP:RO:AO:QR:QA:RS:AS:RP:AP:AB 0/0:7:0:7:134.86:0.00:-84,-27765,-94585:96182:95754:428:95753:427:37686:14:58067:413:0.0044 0/0:0:0:0:200:0.00:-8,-3339,-11423:11654:11589:64:11589:63:0:0:11589:63:0.0054 SVTYPE=DEL;SVLEN=-383;END=992102;STRANDS=+-:7;CIPOS=-5,4;CIEND=-5,4;CIPOS95=0,0;CIEND95=0,0;SU=7;PE=0;SR=7 GT:SU:PE:SR:GQ:SQ:GL:DP:RO:AO:QR:QA:RS:AS:RP:AP:AB 0/0:3:0:3:200:0.00:-2,-26,-101:115:109:6:109:5:109:5:0:0:0.044 James |
The following resolved the MetaSV issue "Object has no attribute 'length' in the last step, Output final VCF file" python/2.2.0-anaconda/lib/python2.7/site-packages/vcf/parser.py -Justin :) |
Thanks @justin-mbca . Was this a change in the pyvcf package? |
It should be. import codecs try: try: try: from model import _Call, _Record, make_calldata_tuple Metadata parsers/constantsRESERVED_INFO = {
} |
Hello,
I ran:
python2.7 run_metasv.py --version
run_metasv.py 0.5
module load bedtools/2.24.0
module load gcc/4.8.4
PATH=$PATH:/bcbiometasv/miniconda/bin
PYTHONPATH="${PYTHONPATH}:/bcbiometasv/miniconda:/bcbiometasv/miniconda/lib/python2.7/site-packages"
python2.7 run_metasv.py --reference hg19_chromosome.fa --boost_sc
--age /bcbiometasv/miniconda/bin/AGE-master/age_align
--pindel_vcf 5.realigned.pindelx5_1toY.N0_PTonly_LI.filtered.somatic.142.recode.vcf 6.realigned.pindelx5_1toY_N0.PTonly_TD.filtered.somatic.142.recode.vcf 7.realigned.pindelx5_1toY_N0.PTonly_D.filtered.somatic.142.recode.vcf 8.realigned.pindelx5_1toY_N0.PTonly_INV.filtered.somatic.142.recode.vcf 9.realigned.pindelx5_1toY_N0.PTonly_SI.filtered.somatic.142.recode.vcf
--cnvnator_vcf 4.PTonly.NTrealign.root.cnvnator.N0.filtered.somatic.142.recode.vcf
--lumpy_vcf 3.tumor.gt.lumpy.svtyper.PRECISE.N0.PTonly.filtered.somatic.142.recode.vcf --manta_vcf 1.somaticSV_manta.PASS.N0only.PTonly.filtered.somatic.142.recode.vcf
--breakdancer_native 2.breakdancer.cfg.LIBTN.a.TumorOnly.noCTXITX.somatic.manEdit.out
--sample filter.somatic
--bam Clean3_mergedL7L8_hg19_kmer_q15_TrimN_N0_L70.recal_sort2_dedup2.realigned2.NTrealign.bam
--spades /bcbiometasv/miniconda/bin/SPAdes-3.6.0/bin/spades.py
--spades_options '-k 71'
--num_threads 4
--workdir /bcbiometasv/miniconda/bin/UP53input
--outdir out_somatic --min_support_ins 2 --max_ins_intervals 1000000
--mean_read_length 146 --isize_mean 365 --isize_sd 104
It is in the last step. I can see variant.vcf with only a header. But I also see the following error. Can you advise me the workaround for this?
INFO 2016-02-28 23:00:57,715 genotype_interval-<Process(PoolWorker-16, started daemon)> For interval chrY:22260563-22301084 DEL counts are 36, 142 and normal_frac is 0.253521 gt is 0/1
INFO 2016-02-28 23:00:58,091 genotype_interval-<Process(PoolWorker-16, started daemon)> For interval chrY:28792949-28793380 DEL counts are 296, 4088 and normal_frac is 0.072407 gt is 0/1
INFO 2016-02-28 23:00:58,245 genotype_interval-<Process(PoolWorker-16, started daemon)> For interval chrY:28805583-28814110 DEL counts are 229, 3217 and normal_frac is 0.0711843 gt is 0/1
INFO 2016-02-28 23:00:58,700 genotype_intervals-<Process(PoolWorker-16, started daemon)> Genotyped 351 intervals in 1.00553 minutes
INFO 2016-02-28 23:00:58,790 parallel_genotype_intervals-<_MainProcess(MainProcess, started)> Following BED files will be merged: ['/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/bin/UP53input/genotyping/0/genotyped.bed', '/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/bin/UP53input/genotyping/2/genotyped.bed', '/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/bin/UP53input/genotyping/1/genotyped.bed', '/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/bin/UP53input/genotyping/3/genotyped.bed']
INFO 2016-02-28 23:00:58,878 parallel_genotype_intervals-<_MainProcess(MainProcess, started)> Finished parallel genotyping of 1410 intervals in 1.08642 minutes
INFO 2016-02-28 23:00:58,882 metasv.main Output final VCF file
Traceback (most recent call last):
File "run_metasv.py", line 5, in
pkg_resources.run_script('MetaSV==0.5', 'run_metasv.py')
File "/usr/local/python/2.7.9/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/python/2.7.9/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 1239, in run_script
execfile(script_filename, namespace, namespace)
File "/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/lib/python2.7/site-packages/MetaSV-0.5-py2.7.egg/EGG-INFO/scripts/run_metasv.py", line 142, in
sys.exit(run_metasv(args))
File "/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/lib/python2.7/site-packages/MetaSV-0.5-py2.7.egg/metasv/main.py", line 335, in run_metasv
convert_metasv_bed_to_vcf(bedfile=genotyped_bed, vcf_out=final_vcf, workdir=args.workdir, sample=args.sample, reference=args.reference, pass_calls=False)
File "/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/lib/python2.7/site-packages/MetaSV-0.5-py2.7.egg/metasv/generate_final_vcf.py", line 476, in convert_metasv_bed_to_vcf
vcf_writer = vcf.Writer(open(vcf_out, "w"), vcf_template_reader)
File "/scratch/RDS-SMS-PCaGenomes-RW/weejar/bcbiometasv/miniconda/lib/python2.7/site-packages/vcf/parser.py", line 673, in init
if line.length:
AttributeError: 'tuple' object has no attribute 'length'
Sorry to bother you with too many questions. Thankyou for your time in helping my research.
James
The text was updated successfully, but these errors were encountered: