igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
352 stars 53 forks source link

KeyError: 'txt for input track #98

Closed MjelleLab closed 1 year ago

MjelleLab commented 1 year ago

We have some issues with the tracks. It compains about a txt file. We have downloaded both the fasta and the reefGene from amazon and the "chr" names should be consistent between the input bam and the inputs tracks. When removing refGene.sorted.txt.gz , it works fine. Any idea?

create_report test_info.vcf \
--fasta hg19.fasta \
--ideogram cytoBandIdeo.txt \
--flanking 1000 \
--info-columns GENE COSMIC_ID  \
--tracks "${bam_file}"  refGene.sorted.txt.gz  \
--output test_cosmic_info.html

...
After filtering, kept 1 out of 1 Individuals
Outputting VCF file...
    Read 33 BED file entries.
After filtering, kept 34 out of a possible 1497 Sites
Run Time = 0.00 seconds
/home/robinm/anaconda3/envs/igv-reports/lib/python3.9/site-packages/vcfpy/header.py:284: DuplicateHeaderLineWarning: Seen FILTER header more than once: LowDP, using firstoccurence
  warnings.warn(
/home/robinm/anaconda3/envs/igv-reports/lib/python3.9/site-packages/vcfpy/header.py:284: DuplicateHeaderLineWarning: Seen FILTER header more than once: LowDP, using firstoccurence
  warnings.warn(
Traceback (most recent call last):
  File "/home/robinm/anaconda3/envs/igv-reports/bin/create_report", line 8, in <module>
    sys.exit(main())
  File "/home/robinm/anaconda3/envs/igv-reports/lib/python3.9/site-packages/igv_reports/report.py", line 503, in main
    create_report(args)
  File "/home/robinm/anaconda3/envs/igv-reports/lib/python3.9/site-packages/igv_reports/report.py", line 73, in create_report
    config = tracks.get_track_json_dict(track)
  File "/home/robinm/anaconda3/envs/igv-reports/lib/python3.9/site-packages/igv_reports/tracks.py", line 7, in get_track_json_dict
    type = get_track_type(format)
  File "/home/robinm/anaconda3/envs/igv-reports/lib/python3.9/site-packages/igv_reports/tracks.py", line 60, in get_track_type
    return dict[format]
KeyError: 'txt
jrobinso commented 1 year ago

@MjelleLab did you resolve your problem?

MjelleLab commented 1 year ago

Yes, just add --genome hg19 :)