asntech / intervene

Intervene: a tool for intersection and visualization of multiple genomic region and gene sets
http://intervene.rtfd.io/
Other
132 stars 28 forks source link

no tmp dir created when generating 3-way "venn" diagram #11

Closed scalavision closed 11 months ago

scalavision commented 5 years ago

I get this traceback when trying to run intervene venn with 3 vcf files:

Traceback (most recent call last):
  File "/opt/anaconda3/bin/intervene", line 606, in <module>
    main()
  File "/opt/anaconda3/bin/intervene", line 522, in main
    labels = upset.genomic_upset(options, label_names)
  File "/opt/anaconda3/lib/python3.6/site-packages/intervene/modules/upset/upset.py", line 50, in genomic_upset
    x = x.intersect(bed, v=True, **kwargs)
  File "/opt/anaconda3/lib/python3.6/site-packages/pybedtools/bedtool.py", line 806, in decorated
    result = method(self, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.6/site-packages/pybedtools/bedtool.py", line 337, in wrapped
    decode_output=decode_output,
  File "/opt/anaconda3/lib/python3.6/site-packages/pybedtools/helpers.py", line 356, in call_bedtools
    raise BEDToolsError(subprocess.list2cmdline(cmds), stderr)
pybedtools.helpers.BEDToolsError: 
Command was:

        bedtools intersect -v -b path/to/Flex200_svaba_converted.vcf -a /tmp/pybedtools.uqris9wu.tmp

Error message was:
Error: unable to open file or unable to determine types for file /tmp/pybedtools.uqris9wu.tmp

- Please ensure that your file is TAB delimited (e.g., cat -t FILE).
- Also ensure that your file has integer chromosome coordinates in the 
  expected columns (e.g., cols 2 and 3 for BED).

Is Intervene supposed to create temporary file / folder for bedtools to work in? Or is this error related to pybedtools? The vcf files are ok, as I've tested them all in 2-way "venn" diagram

asntech commented 5 years ago

Hi @scalavision, yes it is pybedtools which creates temp files. Are you still getting this error? I'm looking into this.

scalavision commented 5 years ago

Thank you @asntech, yes, I am still getting it. Are you able to reproduce it? Unfortunately I don't have time to look into it at the moment, but we are planning to use Intervene in our pipeline later, to show similarities between results.

It would be really nice if it was solved :-)

leipzig commented 2 years ago

bedtools doesn't seem to understand the .tmp intersect file is in fact a vcf, but this has to do with a lack of a proper header rather than the file suffix.

the solution is to run intervene upset *vcf.gz --bedtools-options header