Suppress warnings

313 views
Skip to first unread message

geoffrey wong

unread,
Sep 15, 2015, 10:51:57 AM9/15/15
to Pysam User group
I keep getting this warning:

Warning: The index file is older than the data file: /path/to/file

I was wondering if there was a way to suppress the warning, since it is filling up my log file so much that I can't find the relevant info in it.


Thank you!

Sean Davis

unread,
Sep 15, 2015, 10:54:22 AM9/15/15
to pysam-us...@googlegroups.com
On Sep 15, 2015, at 10:51 AM, geoffrey wong <geoffre...@gmail.com> wrote:

I keep getting this warning:

Warning: The index file is older than the data file: /path/to/file

Perhaps reindex the file?

Sean


I was wondering if there was a way to suppress the warning, since it is filling up my log file so much that I can't find the relevant info in it.


Thank you!


--
You received this message because you are subscribed to the Google Groups "Pysam User group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pysam-user-gro...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

geoffrey wong

unread,
Sep 15, 2015, 10:58:21 AM9/15/15
to Pysam User group
That would help short term, but there is an entire analysis pipeline for this. Reindexing the file everytime would be alot of work since I would have to do this every time.

Florian Finkernagel

unread,
Sep 15, 2015, 11:10:20 AM9/15/15
to Pysam User group
The offending line is in htslib/hts.c, around line 1660, I guess you could remove it and recompile.

But the real question is of course: why does your pipeline produce this situation? 
Are you writing to the bam after the index has been created?
Is your file system bonkers?

Sean Davis

unread,
Sep 15, 2015, 11:10:56 AM9/15/15
to pysam-us...@googlegroups.com
On Sep 15, 2015, at 10:58 AM, geoffrey wong <geoffre...@gmail.com> wrote:

That would help short term, but there is an entire analysis pipeline for this. Reindexing the file everytime would be alot of work since I would have to do this every time.

I am probably misunderstanding the problem, but the warning implies that the index is older than the actual BAM file.  The fix for this warning is to re-index the BAM file; doing so should make the index newer than the BAM file and eliminate the warning.  I cannot think of a situation where you would want to “reuse” an index file that was generated on a previous version of a BAM file.  

If I am missing something, perhaps a little more detail would be useful.

Sean
signature.asc

geoffrey wong

unread,
Sep 15, 2015, 11:20:45 AM9/15/15
to Pysam User group
The file system is inherently the issue, but that's out of my control to change. The files get generated in the right order, but when they get uploaded for me to see from the VM to wherever the cloud provider decides to put it, they get messed up I assume and the index file becomes older than the bam file(since the bam files are alot bigger to upload i imagine). This creates this issue in the end. I'm not "resuing" the index file, it just happens that the index file gets re-generated before the bam file does.
To unsubscribe from this group and stop receiving emails from it, send an email to pysam-user-group+unsub...@googlegroups.com.

Florian Finkernagel

unread,
Sep 15, 2015, 11:28:23 AM9/15/15
to Pysam User group
In this case, might I suggest 'touch'-ing the files within your pipeline so that the file modification times are identical?

geoffrey wong

unread,
Sep 15, 2015, 11:32:06 AM9/15/15
to Pysam User group
That was going to be the plan if I couldn't suppress warnings easily.
Reply all
Reply to author
Forward
0 new messages