error in sed usage
Hello,
I am using this loop for a software"
RUN=$(printf "%02d" ${SLURM_ARRAY})
INPUT_DIR=/path
OUTPUT_DIR=/path
echo "RUN"
INPUT_FILE=$(ls $INPUT_DIR/*.bed | sed -n ${RUN}p)
SAMPLE=$(basename "$INPUT_FILE" .bed)
echo "RUN #${RUN} with sample ${SAMPLE}"
freebayes -f genome.fasta \
-L genome_1.txt \
--targets ${INPUT_FILE} > ${OUTPUT_DIR}/${SAMPLE}_.vcf
But I am getting error:
sed: -e expression #1, char 3: invalid usage of line address 0
Thank you for the help.
• 1,642 views
•
link
0 answers
No answers yet.
Log in to answer this question.
This is not reproducible, please give examples on what the variables store.
Edit: Deleted, OP unable to answer questions.
I have added the code that I used it for. Please let me know if it is works now or not. Thank you!
That's not what I mean. Please give a representative example of the content of each variable so we know what it contains, not code, just a string what they contain.
RUNrepresents 10bedfiles;INPUT_DIRrepresents path tobedfiles;OUTPUT_DIRrepresents path forvcffiles to be madewhat are you trying to do with
sed? or what is the expected value ofINPUT_FILE?INPUT_FILEis expected to give each of thebedfile name along with path to run with an array.I am not sure if freebayes
--targetsaccepts more than one file, but in case you will need to put together in a single string, like: