# How to segment genome into homozygote/heterozygote blocks based on RNA-Seq data

Given a RNA-Seq data of a progeny between two inbred lines (for example an F4 plant which was derived from two inbred lines (parents) and the F1 selfed 3 times; however this is probably not crucial for the question).

We know the progeny should have only a few breakpoints in each chromosome, so one should expect long stretches (>1MB) with those 3 states:

1. homozygous for parent1
2. homozygous for parent2
3. heterozygous

In each state, most containing genes should therefore be reflecting this state, i.e. only expressing the parent1 allele in state 1) (i.e all SNPs support parent1) etc. A caveat would be uni-allelic expression at a heterozygous state 3), but this surely will not be the case for all genes in a given block (100+ genes per block are expected).

Both parental genomes and RNA-Seq libraries for both parents and F4 are available.

Naively I'd do SNP-calling (e.g. GATK HaplotypeCaller or bcftools call) of an F4 mapped against one parental reference and somehow combine the allele frequency in a sliding window and evaluate the likelihood of the given window to be in state 1-3. E.g. if all alleles support parent 1, it's probably state 1).

But I feel this must have been done before but can't quite find the right software or workflow software to use. But maybe I'm missing something. Ideally, a workflow would have as input the F4 RNA-Seq data (possibly alos parental RNA-Seq data), the parental genome(s) and as output a list of segments per chromosome.

I know, we could do gDNA sequencing for this even better, but I think RNA-Seq might also do the job and might save effort since already available.