featureCounts segmentation fault
1
0
Entering edit mode
13 hours ago
Jaber • 0

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

bioinformatics featureCounts pipeline RNA-Seq • 184 views
ADD COMMENT
0
Entering edit mode

Thank you, I already extracted manually, as I am using WSL, and directories are correct, and I still get the error saying "Segmentation fault"

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

Please show relevant code. This is almost certainly some issue with the GTF.

ADD REPLY
3
Entering edit mode
11 hours ago
Mensur Dlakic ★ 28k

It is very difficult to follow al the lines as your script content are not properly formatted.

It appears that in one command you are downloading the .GTF file into a current directory (wget http://ftp.ensembl.org/pub/release-106/gtf/homo_sapiens/Homo_sapiens.GRCh38.106.gtf.gz) and in the next command you are reading the unpacked GTF file located one directory up (featureCounts -s 2 -a ../hg38/Homo_sapiens.GRCh38.106.gtf ...). You may need to unpack the file after the wget command (gunzip Homo_sapiens.GRCh38.106.gtf.gz) and read from the current directory:

featureCounts -s 2 -a hg38/Homo_sapiens.GRCh38.106.gtf ...
ADD COMMENT
0
Entering edit mode

featureCounts will also accept bgzip-ed and tabix indexed GTF. It may be a bit faster than using plain GTF but frankly I have not done a proper benchmarking.

ADD REPLY

Login before adding your answer.

Traffic: 1956 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6