samplot icon indicating copy to clipboard operation
samplot copied to clipboard

plot with transcripts error

Open abrusell opened this issue 2 years ago • 2 comments

I've downloaded, sorted and indexed the gff3 file from ensembl, but when I use it with samplot plot -T I get the following error:

$ samplot plot -c chr14 -s 103334932 -e 103491427 -t DEL -T $db/hg38/Samplot/Homo_sapiens.GRCh38.110.sort.gff3 -r $db/hg38/reference/Homo_sapiens_assembly38.fasta -o DEL00117515 -b prob_markdup.bam father_markdup.bam mother_markdup.bam  -n PROB FATHER MOTHER 
Traceback (most recent call last):
  File "~/miniconda3/envs/samplot/bin/samplot", line 10, in <module>
    sys.exit(main())
  File "~/miniconda3/envs/samplot/lib/python3.9/site-packages/samplot/__main__.py", line 31, in main
    args.func(parser, args, extra_args)
  File "~/miniconda3/envs/samplot/lib/python3.9/site-packages/samplot/samplot.py", line 3655, in plot
    plot_transcript(
  File "~/miniconda3/envs/samplot/lib/python3.9/site-packages/samplot/samplot.py", line 3419, in plot_transcript
    transcript_plan = get_transcript_plan(ranges, transcript_file)
  File "~/miniconda3/envs/samplot/lib/python3.9/site-packages/samplot/samplot.py", line 3331, in get_transcript_plan
    genes[info["Name"]] = [
KeyError: 'Name'

abrusell avatar Nov 09 '23 16:11 abrusell

This was fixed in https://github.com/ryanlayer/samplot/pull/157. I guess you are using samplot through conda? The change is not implemented in that version. Try installing the development version e.g.

pip install git+https://github.com/ryanlayer/samplot.git

pontushojer avatar Nov 10 '23 09:11 pontushojer

Thank you, fixed!

abrusell avatar Nov 10 '23 10:11 abrusell