1

I have a command list like this

bedtools intersect -a BED1 -b BED2 >BED1_BED2_overlaps.txt
...

with over 100 files.

Here is the header for my job submission

#SBATCH -t 0-08:00
#SBATCH --job-name=JACCARD_DNase
#SBATCH -o /oasis/scratch/XXX/XXX/temp_project/logs/JACCARD_DNase_%a_out
#SBATCH -e /oasis/scratch/XXX/XXX/temp_project/logs/JACCARD_DNase_%a_err
#SBATCH --array=1-406%50

When I submit the job I get this error

Error: Unable to open file >BED1_BED2_overlaps.txt Exiting.

I tried to pipe an echo command like this

bedtools intersect -a BED1 -b  BED2 | echo "BED1 BED2" 

And I got

Error: Unable to open file |. Exiting.

So what gives? How can I submit array jobs with Bash syntax like > output and | pipes?

1 Answer 1

3

It looks like you are missing the shebang ; your submission script should start with

#! /bin/bash

or any other shell you like.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.