Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
samtools faidx Segmentation fault baohua100 Bioinformatics 19 04-19-2016 08:09 AM
samtools view segmentation fault Axel Bioinformatics 10 07-09-2014 03:06 AM
Segmentation fault with samtools rmdup Azazel Bioinformatics 1 09-05-2013 09:48 AM
samtools mpileup segmentation fault adrian Bioinformatics 8 10-05-2012 08:17 AM
samtools segmentation fault pileup biochemMScstudent Bioinformatics 1 08-14-2012 12:31 PM

Thread Tools
Old 08-24-2020, 02:20 PM   #1
Junior Member
Location: Europe

Join Date: Jul 2018
Posts: 6
Default Segmentation fault in samtools

I am trying to generate BAM files, however there is some error with reference indexing.

[samfaipath] build FASTA index...
[E::fai_build_core] Format error, unexpected "N" at line 1
[samfaipath] fail to build FASTA index.
./ line 19: 117505 Segmentation fault ./samtools view -bT $reference $file > $bamfile

here is my code

samtools faidx refseq.fasta

for file in $INPATH/*.sam ;
bname=$(basename $file ".sam")
echo $bname
cd /dir/samtools-1.10
./samtools view -bT $reference $file > $bamfile

./samtools sort -o $bamfile $file

# Add ms and MC tags for markdup to use later
./samtools fixmate -m $namesort $fixmate

# Markdup needs position order
./samtools sort -o $positionsort $fixmate

# Finally mark duplicates
./samtools markdup $positionsort $markdup
Kaskere is offline   Reply With Quote
Old 08-25-2020, 07:01 AM   #2
Senior Member
Location: Bethesda MD

Join Date: Oct 2009
Posts: 509

The first error message indicates that your reference genome is the culprit. Some versions contain 'N's that correspond to placeholders for the telomeric repeats. This causes reference indexing to fail, which in turn results in the segmentation fault.
HESmith is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 06:02 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO