gstacks is not reading sorted bam files

517 views
Skip to first unread message

juliasch...@yahoo.de

unread,
Aug 3, 2018, 4:47:21 AM8/3/18
to Stacks
Hello stacks experts, 
I am struggling with getting stacks version 2.1. running for my data. With an older version 1.42 there were no problems using exactly the same sorted bam input files (from mapping ddRAD reads against a reference genome). 

If I now try to get them into gstacks v.2.1. I get the following error message:

Configuration for this run:

  Input mode: reference-based, unpaired

  Population map: '/user/xy/Steato/GGMTIN_sam/POPset/gstackstest/PopNames2.txt'

  Input files: 2, e.g. '/user/xy/Steato/GGMTIN_sam/POPset/gstackstest/G2138_4.bam'

  Output to: '/user/xy/Steato/GGMTIN_sam/POPset/'

  Model: marukilow (var_alpha: 0.05, gt_alpha: 0.05)

  Ignoring pairing information.


Reading BAM headers...

Processing all loci...

Error: All records were discarded.

Error: (At the 150617th record in file '/user/defi4625/Steato/GGMTIN_sam/POPset/gstackstest/G2138_4.bam'.)

Aborted.


The first 3500 lines of one of the files are attached in bam and sam format. The mapping was done with a short read mapper called seagemehl which should produce just normal sam files. Sam files were then converted to bam using samtools version 1.7, but I also tried other (older and newer) versions with the same result. I very much appreciate any help!!

All the best, 

Julia


G2138_4_3500.bam
G2138_4_3500.sam

Audrey Bourret

unread,
Aug 27, 2019, 10:13:36 AM8/27/19
to Stacks
Hi Julia,

I have received a similar error message with gstacks 2.4 :

"Processing all loci..."                                                                                                  
"Error: All records were discarded."                                                                                      
"Error: (At the 784720th record in file '/media/gyani/My_Book/Belugas_2018/Data/03b_Align/DL_0002.sorted.bam'.)"          
"Aborted."                                                                          

Did you find a solution?

Audrey

Ying Chen

unread,
May 28, 2024, 5:14:05 PM5/28/24
to Stacks
Hello, 

I encountered the same error and the samples causing this issue have extremely low mapped reads. Therefore I took those samples out and gstacks is now running. 

Best,
Ying
Reply all
Reply to author
Forward
0 new messages