Hi, community,
I am trying to run a bash file with the following, and everything works fine except I keep getting segmentation faults, Can anyone help me solve this?
Below is the bash script:
#!/bin/bash
SECONDS=0
# Change working directory
cd "/mnt/e/Genomic learning/pipeline/RNA_Seq_pipeline"
# STEP 1: Run FastQC
fastqc Data/demo.fastq -o Data/
# Run Trimmomatic to trim reads with poor quality
java -jar /mnt/f/Trimmomatic-0.39/trimmomatic-0.39.jar SE -threads 4
/mnt/e/Genomic/learning/pipeline/RNA_Seq_pipeline/data/demo.fastq
/mnt/e/Genomic/learning/pipeline/RNA_Seq_pipeline/data/demo_trimmed.fastq TRAILING:10 -phred33
echo "Trimmomatic finished running!"
fastqc Data/demo_trimmed.fastq -o Data/
# STEP 2: Run HISAT2
# mkdir HISAT2
# Get the genome indices
wget https://genome-idx.s3.amazonaws.com/hisat/grch38_genome.tar.gz
# Run alignment
echo "HISAT2 started running!"
hisat2 -q --rna-strandness R -x HISAT2/grch38/genome -U Data/demo_trimmed.fastq | samtools sort -o HISAT2/demo_trimmed.bam
echo "HISAT2 finished running!"
# STEP 3: Run featureCounts - Quantification
# Get GTF
wget http://ftp.ensembl.org/pub/release-106/gtf/homo_sapiens/Homo_sapiens.GRCh38.106.gtf.gz
echo "featureCounts started running!"
featureCounts -s 2 -a ../hg38/Homo_sapiens.GRCh38.106.gtf -o quants/demo_featurecounts.txt
HISAT2/demo_trimmed.bam
echo "featureCounts finished running!"
duration=$SECONDS
echo "$((duration / 60)) minutes and $((duration % 60)) seconds elapsed."
Keeping in mind I have correct directories and I evaluated the HISAT bam file with samtools and no errors appeared.
The error: "Segmentation fault" after running the feature counts, and everything else runs smoothly
thanks
Thank you, I already extracted manually, as I am using WSL, and directories are correct, and I still get the error saying "Segmentation fault"
Can you try running each part/command manually on the command line (instead of the bash script) to see if there might be an error/warning that gets missed in one of the previous steps which could effect the
featureCounts
run?Please show relevant code. This is almost certainly some issue with the GTF.