churchill-lab / g2gtools

Personal diploid genome creation and coordinate conversion
http://churchill-lab.github.io/g2gtools
21 stars 9 forks source link

Still issue converting sam/bam files #20

Open kingralph80 opened 4 years ago

kingralph80 commented 4 years ago

Hi, I am using the g2gtools 0.29 commit. I generated the haploid genome with g2gtools. No errors and about 12 mill SNPs were used, and 2.6 million Indels. I mapped against both genomes (ref, g2g_haploid). But when I try to use g2gtools convert to uplift the sam/bam file mapped against the g2g_haploid I get:

Also convert of gtf files seems to work fine.

[g2gtools]


[g2gtools] Converting A00742:39:HKM32DSXX:4:1101:20085:1172 6 108723979 90M
[g2gtools] PAIRED END ALIGNMENT
[g2gtools] Chromosome 6 not found in mapping tree
[g2gtools] Available chromsomes are: dict_keys([])
[g2gtools] Chromosome 6 not found in mapping tree
[g2gtools] Available chromsomes are: dict_keys([])
[g2gtools]      Fail due to no mappings
[g2gtools] 

In the vci file there clear are the chromosomes:
##INPUT_VCF=/netscratch/dep_psl/grp_frommer/Thomas/Results/282_VCF/GATK/final/282_VCF.Oh43.sens99.vcf.gz
##FASTA_FILE=/netscratch/dep_psl/grp_frommer/Michael_Thomas/Genomes/Zea_mays/B73/AGPv4/Zea_mays.AGPv4.dna.toplevel.fa
##STRAIN=282set_Oh43
##VCF_KEEP=False
##FILTER_PASSED=True
##FILTER_QUALITY=False
##DIPLOID=False
##PROCESSES=60
##CONTIG=1:307041717
##CONTIG=2:244442276
##CONTIG=3:235667834
##CONTIG=4:246994605
##CONTIG=5:223902240
##CONTIG=6:174033170
##CONTIG=7:182381542
##CONTIG=8:181122637
##CONTIG=9:159769782
##CONTIG=10:150982314

And further down:

6       96091195        .       G       A       .
6       96091245        .       C       T       .
6       96099611        .       A       G       .
6       96099636        .       T       G       .
6       96099671        T       CC      .       9056
6       96099675        T       .       ATC     2
6       96099679        .       G       T       .
6       96099729        .       G       A       .
6       96099799        .       T       C       .
6       96099897        .       C       T       .
6       96099900        .       T       C       .
6       96099939        .       A       G       .
6       96100275        .       G       T       .
6       96100281        .       T       C       .
6       96100301        .       T       C       .
6       96100303        .       G       A       .
6       96100392        .       G       A       .
6       96100450        .       G       A       .
6       96100480        .       A       G       .
6       96100517        .       A       G       .
6       96100542        .       C       T       .
6       96100544        .       T       C       .
6       96100560        .       C       T       .
6       96100602        .       A       G       .
6       96100613        .       T       A       .
6       96100633        .       G       A       .
6       96100646        .       A       G       .
6       96100655        .       T       C       .

        ___       _              _
       |__ \     | |            | |
   __ _   ) |__ _| |_ ___   ___ | |___
  / _` | / // _` | __/ _ \ / _ \| / __|
 | (_| |/ /| (_| | || (_) | (_) | \__ \
  \__, |____\__, |\__\___/ \___/|_|___/   v0.2.9
   __/ |     __/ |
  |___/     |___/
kingralph80 commented 4 years ago

Hey, It seems this error is due to a version difference in python. It seems to work if I run it under python 2.7 but gives this error in python 3.7.1.

amkilpatrick commented 1 year ago

Hi @kingralph80, I realise this is now an old old issue! But I'm having a similar issue - is this a case of forcing to run with a specific python version? And if so is there a straightforward way to do that? I installed via the anaconda distribution. Thanks!