This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Do file extensions effect files

I just created a bed file from the GATK walker VariantsToBinaryPed. It was of course supposed to be a ped file. Now I can't use it as input to phaseByTransmission. My question is: is the file crap even if I change the file ending afterwards? If so, are all filetypes so sensitive?

And while I'm at it, an irrelevant bonus question: has anyone tried phaseByTransmission with more than a trio?

Edit: my problem was the -ped option. It was typed -bed. I'm having troubles typing ped here as well. My brain is telling me to go to sleep.

unix ped linux gatk

3 answers

Ha! This is a confusing question. The "mansplainer" in me wants to tell you that file extensions don't matter one bit, although in this case file extensions do matter, and some understanding of the file *format* is needed.

Most people will be familiar with .bed files as text files representing interval data. In your case, you are creating a binary version of a .ped text file, which represents a pedigree for genetic analysis. Your .bed pedigree file does not equal other .bed interval files, so in this case the file extension is not only arbitrary but also confusing. Most importantly you *cannot* change the file extension from .bed to .ped and use the resulting file for software that expects the text representation of a pedigree.

Ah, so there's a binary .bed as well! I had no idea, thank you!

Assuming a UNIX based operating system, no, file extensions do not matter. Extensions are for denoting content types to humans than to operating systems, though OS's use them as convenient markers. You should be able to pass a file as input to a program that accepts a file of the underlying content type irrespective of the extension. This of course also depends on how the program itself performs its validation (by sniffing first few lines of input file or by validating extension).

If you're dealing with plain text files, I'd suggest sniffing it by `head` ing first few lines and figuring out if there's a format mismatch.

Also, such output will help us pinpoint possible errors if you post it here.

It is binary data so its no use posting heads.

It doesn't matter. File extension only tells your OS and programs what kind of file it is..

Log in to answer this question.