Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bam_vs_bed error if bashrc outputs anything #29

Open
IanSudbery opened this issue Oct 23, 2018 · 0 comments
Open

bam_vs_bed error if bashrc outputs anything #29

IanSudbery opened this issue Oct 23, 2018 · 0 comments

Comments

@IanSudbery
Copy link
Contributor

IanSudbery commented Oct 23, 2018

bam_vs_bed starts a subshell, excutes a command and grabs the standard output. It assumes that the output in the stdout is only the output from the bedtools intersect command it runs, but it your ~/.bashrc outputs anything to stdout (which might not be under your control on a shared system), then this screws up the output parsing and causes bam_Vs_bed to out the following cryptic message:

Traceback (most recent call last): \
    File "/shared/sudlab1/General/apps/conda/conda-install/envs/cgat-f/bin/cgat", line 11, in <module> \
       load_entry_point('cgat', 'console_scripts', 'cgat')() \
    File "/shared/sudlab1/General/apps/conda/cgat-apps/cgat/cgat.py", line 132, in main \
         module.main(sys.argv) \
    File "/shared/sudlab1/General/apps/conda/cgat-apps/cgat/tools/bam_vs_bed.py", line 256, in main \
          iterate(iotools.force_str(proc.stdout)), key=sort_key): \
    File "/shared/sudlab1/General/apps/conda/cgat-apps/cgat/tools/bam_vs_bed.py", line 253, in iterate \
          yield data._make(line[:-1].split()[:take_columns]) \
    File "<string>", line 21, in _make \
 TypeError: Expected 17 arguments, got 3 \

It there a way to avoid this althogether (change the way the enviornment is passed to the subshell? Use a named pipe rather than stdout, or use a temporary file?). If not, is there a way to at least give a better error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant