ANGSD reference index error

335 views
Skip to first unread message

Beate Nurnberger

unread,
Jun 18, 2021, 10:35:14 AM6/18/21
to Ashworth Codemonkeys

Dear All,

I wonder whether the ANGSD users among you have come across the following error. I posted it on the github angsd issues page, but since there seems to be a bit of a backlog of open issues, perhaps I could pick your brains also.

Regards,
Beate

**********************************************************************

I seem to have the same problem that was raised and resolved in an earlier post (2014-07-29):

-> Problem with difference in zlib version used for compiling and linking
-> ZLIB_VERSION: 1.2.8 zlibversion: 1.2.11
-> angsd version: 0.920 (htslib: 1.6) build(Jan 17 2018 13:38:41)
-> Reading fasta: Bv_mixed_reference_masked_new.fasta
-> fai index file: 'Bv_mixed_reference_masked_new.fasta.fai' looks older than corresponding fastafile: 'Bv_mixed_reference_masked_new.fasta'.
-> Please reindex fasta file

This happens even though the index is created by the same shell script that calls angsd and shows up in my log file (via ls) prior to the angsd call. angsd commands that do not require a reference execute without error.

I realise that I am not using the latest version, but I don't spot any entries in the recent changelogs that seem to relate to this.

Tim Booth

unread,
Jun 18, 2021, 12:14:38 PM6/18/21
to ashworth-c...@googlegroups.com
Hi Beate,

I'm not a user of ANGSD but I have a couple of comments:

1) The version mismatch of ZLIB should not matter since it only differs in the minor version. I wouldn't worry about this.

2) The source for ANGSD shows that the check is made using aio::isNewer


And this in turn uses a standard stat system call


I can't see much room for error in their code. I suspect that the timestamp on your .fasta.fai file really is somehow older than the .fasta file. Maybe some clock skew is involved? Can you use 'ls -l' or 'stat' in your shell script to see the mtimes on both files?

Cheers,

TIM

On Fri, 2021-06-18 at 07:35 -0700, Beate Nurnberger wrote:
This email was sent to you by someone outside the University.
You should only click on links or attachments if you are certain that the email is genuine and the content is safe.
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.

Beate Nurnberger

unread,
Jun 18, 2021, 12:30:32 PM6/18/21
to ashworth-c...@googlegroups.com
Hi Tim,

Many thanks indeed for digging into the ANGSD code for this. The 2014 post suggested that the error message was wrongly printed when the .fai file could not be found. And this was fixed apparently.

This is what my log file says:

2021-06-16 15:55:46 ls /scratch/bdnurnberger/job_7866388.meta-pbs.metacentrum.cz
total 3488
-rw-rw---- 1 bdnurnberger fishery 3342920 Jun 16 15:55 Bv_mixed_reference_masked_new.fasta
-rw-rw---- 1 bdnurnberger fishery  217901 Jun 16 15:55 Bv_mixed_reference_masked_new.fasta.fai
-rw-rw---- 1 bdnurnberger fishery    2528 Jun 16 15:55 bamfiles_abs_path.txt
drwxrwx--- 2 bdnurnberger fishery       6 Jun 16 15:55 input
drwxrwx--- 2 bdnurnberger fishery       6 Jun 16 15:55 output
drwxrwx--- 2 bdnurnberger fishery       6 Jun 16 15:55 tmp
2021-06-16 15:55:46
2021-06-16 15:55:46  === running 'ANGSD...' ..
2021-06-16 15:55:46   .. done
2021-06-16 15:55:47 -- cleaning up --

It looks to me as if the timestamping is correct. I think I'll ask our sysadmin to install the latest version of angsd and then try again.

Regards,
Beate

--
The wiki is at:
https://www.wiki.ed.ac.uk/display/AshCodes/Ashworth+Codemonkeys
The mailing list archive is at:
https://groups.google.com/forum/?fromgroups#!forum/ashworth-code-monkeys
If you have trouble editing the wiki or emailing the group, let me know: sujai...@ed.ac.uk
---
You received this message because you are subscribed to the Google Groups "Ashworth Codemonkeys" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ashworth-code-mo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/ashworth-code-monkeys/c398ca9efdc29b62153abe78d4ecaf16eef097a3.camel%40ed.ac.uk.
Reply all
Reply to author
Forward
0 new messages