I am currently aligning paired-end reads to the reference genome (genome index created) and the goal is to end up with a single bam file. This is the code that I am using and everything works fine until the last code line. I get the error message that the file 'SRR5882797_10M.bam' doesn't exist. This file doesn't exist yet, of course, but this is what I am trying to send my output file to and is therefore, supposed to be created with this code. I am not sure how to fix this since it seems to be asking me to have a file in the folder already. Thanks :)
bwa mem -t 2 Refs/Athaliana/Arabidopsis_thaliana_TAIR10 02_trimmedData/fastq/SRR5882797_10M_1.fastq.gz 02_trimmedData/fastq/SRR5882797_10M_2.fastq.gz | samtools view -bhS -F4 - > 03_alignedData/bam/SRR5882797_10M.bam