davidebolo1993 / VISOR

VarIant SimulatOR for short, long and linked reads
GNU Lesser General Public License v3.0
41 stars 11 forks source link

visor shorts: IndexError #1

Closed ptrebert closed 5 years ago

ptrebert commented 5 years ago

Hi Davide, I am running VISOR version yesterday's master. I use the data provided in the example folder, HACk finished successfully. For SHORtS --type single-strand, the following error occurs:

Traceback (most recent call last):
  File "/TL/epigenetics2/work/pebert/conda/envs/strandsim/bin/VISOR", line 10, in <module>
    sys.exit(main())
  File "/TL/epigenetics2/work/pebert/conda/envs/strandsim/lib/python3.6/site-packages/VISOR/VISOR.py", line 100, in main
    args.func(parser, args)
  File "/TL/epigenetics2/work/pebert/conda/envs/strandsim/lib/python3.6/site-packages/VISOR/VISOR.py", line 160, in run_subtool
    submodule.run(parser,args)
  File "/TL/epigenetics2/work/pebert/conda/envs/strandsim/lib/python3.6/site-packages/VISOR/SHORtS/SHORtS.py", line 238, in run
    if str(entries[3]) not in labels_seen_h1:
  File "pybedtools/cbedtools.pyx", line 523, in pybedtools.cbedtools.Interval.__getitem__
IndexError: field index out of range

Best, Peter

davidebolo1993 commented 5 years ago

Hi Peter,

can You copy-paste the command line You run for VISOR SHORtS? It seems that the input .bed file (the -h1b .bed in this case) is not properly formatted. I've tried VISOR SHORtS with the .bed file in Examples/SHORtS.LASeR.h1.h2.bed and I cannot reacreate the error.

Let me know.

Best,

Davide

ptrebert commented 5 years ago

Hi Davide, sorry, I was a bit too imprecise: I use the "haplotype specification" (?) BED files HACk.h1.bed and HACk.h2.bed, the two generated FASTA files generated with HACk, but a genome-wide regions file - which seems to be missing the label that is accessed in str(entries[3]). Can I just copy the chromosome name again into the LABEL column? Best, Peter

davidebolo1993 commented 5 years ago

I guess that the .bed files You gave as inputs to SHORtS are the problems. HACk.h1.bed and HACk.h2.bed are meant to be used for VISOR HACk. The two .bed files that must be give to SHORtS are .bed files with 4 columns in which You specify the chromosome, the region start, the region end and a label (to identify the output) as in Examples/SHORtS.LASeR.h1.h2.bed. You can give the same .bed to -h1b and -h2b to simulate the same region from both haplotypes.

In order to simulate the entire genome on both haplotypes you can give an input .bed to -h1b and -h2b where you specify each chromosome, its start, its end and its label.

Hope that it's more clear now.

Let me know.

Best,

Davide

ptrebert commented 5 years ago

Yes, so I duplicated the chromosome name for the LABEL column - seems to work now, thanks.

+Peter