This site is a beta test.
Forum: Recovering bam files after unknow deletion in the storage
0
Entering edit mode
6 weeks ago
Gabriel Wajnberg • 60

Hello all,

We had a problem in our storage and for an unknown reason, we lost data.... I used photorec to recover the lost data, however, photorec recovers (as I understood not the total files), so for example I could recover some bam files and convert them to sam, however they are just a fragment , a couple of mb of data each file.

I realized that there are huge gb binary files, (with a real expected bam files size) and if I just read it , I can see sometimes reads ids in the middle of the binary code... however when I try to read it using samtools view, it can't read , it was complaining about EOF problem (however, I found a good script to insert an EOF end and now samtools doesn't complain about this ) and also about "fail to read the header" ...is there a way to insert a header in this possible bam file? or another option to recover these files??

Ps: we don't have backup =(

Entering edit mode
2

Even if you managed to recover readable files, would you trust their content?

ADD REPLYlink 4 months ago
Jean-Karim Heriche
19k
Entering edit mode
0

the current readable files I don't trust at all...

ADD REPLYlink 4 months ago
Gabriel Wajnberg
• 60
Entering edit mode
2

Go to a professional data recovery specialist.

ADD REPLYlink 4 months ago
Kevin Blighe
43k
Entering edit mode
1

I would add my voice to Kevin Blighe; don't lose any more time and just go to a professional data recovery.

ADD REPLYlink 4 months ago
H.Hasani
• 730
Entering edit mode
1

I still wouldn't trust the recovered data. Most likely either part of the data was overwritten or the storage (disk?) failed and bits have been corrupted. The only situation in which I would trust a recovered file is when only the link to the inode (on Linux) has been removed (i.e. the file was accidentally deleted and nothing had time to overwrite it yet).

ADD REPLYlink 4 months ago
Jean-Karim Heriche
19k
Entering edit mode
0

You mean that the mere act of trying to recover the data may have damaged it further? This happened to me a few years ago. I realised the serious nature of the failure and did not try to do anything myself.

ADD REPLYlink 4 months ago
Kevin Blighe
43k
Entering edit mode
1

however, I found a good script to insert an EOF end and now samtools doesn't complain about this

That's not a good fix, samtools is trying to warn you about a legitimate error and you're just bypassing its error checking mechanism, not addressing the underlying corruption. Don't use that script

ADD REPLYlink 4 months ago
RamRS
21k
Entering edit mode
0

I just want to check the content of these binary files! or I just categorized as lost ??

ADD REPLYlink 4 months ago
Gabriel Wajnberg
• 60
Entering edit mode
0

Unless you understand the cause/source of the corruption, without backup there's not much you can do.

ADD REPLYlink 4 months ago
Jean-Karim Heriche
19k
Entering edit mode
1

At some point, it could be cheaper just to sequence again the samples (if available)

ADD REPLYlink 4 months ago
JC
7.9k
Entering edit mode
0

Thank you for all the tips!

ADD REPLYlink 4 months ago
Gabriel Wajnberg
• 60

Login before adding your answer.

Powered by the version 1.5.2