I currently have several hundred BAM files which were downloaded by someone else. These have remained untouched---before working with them, I would like to double-check that these BAMs have been fully downloaded.
I don't MD5 Checksums to look at.
In order to validate the BAMs, I would use something like Picard's ValidateSamFile, https://broadinstitute.github.io/picard/command-line-overview.html#ValidateSamFile
java -jar picard.jar ValidateSamFile \
I=input.bam \
MODE=SUMMARY
I could write a bash script, and run through these BAMs, and then read through the Picard output. That is checking whether the BAM is valid though, not whether it was downloaded fully (e.g. the BAM could be downloaded correctly, but be inherently flawed in some other way).
If the BAM is downloaded fully, isn't there some "end of file" bytes I could quickly check? Are there other more efficient methods?