intervene icon indicating copy to clipboard operation
intervene copied to clipboard

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

Open scalavision opened this issue 7 years ago • 3 comments
trafficstars

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

scalavision avatar Aug 29 '18 08:08 scalavision

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

asntech avatar Sep 04 '18 17:09 asntech

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 :-)

scalavision avatar Sep 12 '18 15:09 scalavision

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

leipzig avatar Aug 04 '21 21:08 leipzig