Coding · Plotting · Python

Inferring the sex based on exome sequencing

So today I came across the annoying issue that someone had not bothered to document the sex of samples, even when we generated exome sequencing data of those. So I wrote a script to figure this out based on coverage on the X and Y chromosomes, but not in the pseudoautosomal regions.

The script can be found below and takes as input a directory of bams. Based on empirical observations I set some cut-offs to infer the sex based on the ratio between X and Y coverage, but your mileage may vary depending on your kit used for exome sequencing (we use Roche SeqCap EZ Exome v3.0). At the end, it also produces a plot showing the determined sexes and ambiguous samples with their identifiers.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s