eweitz / ideogram

Chromosome visualization for the web
https://eweitz.github.io/ideogram
Other
288 stars 72 forks source link

Annotating genes in human pseudoautosomal regions #257

Closed cmixon closed 3 years ago

cmixon commented 3 years ago

Annotations are not drawn for genes in the pseudoautosomal regions of X and Y chromosomes because ENTREZ returns the X and Y chromosome loci for these genes. See for example CRLF2 and SHOX.

I can map the genes to the X chromosome by changing the property value:

                               if(result.chromosome === "X, Y"){result.chromosome = "X"};

but it would be more desirable to show these genes on both chromosomes.

eweitz commented 3 years ago

Agreed, it makes sense to show multiple annotations for genes with multiple loci.

So you could perhaps account for CRLF2 and other genes in PAR with something like:

// Annotation on the other sex chromosome's PAR
let otherParResult = null;

if (result.chromosome === "X, Y") {
  result.chromosome = "X"
  otherParResult = result
  otherParResult.chromosome = "Y"
};

processedResults.push(result)

if (otherParAnnot) processedResults.push(otherParResult)

P.S.: Thank you for properly styling -- I had forgotten that gene symbols ought to be italicized!

P.P.S.: You might also be interested in https://eweitz.github.io/ideogram/homology-basic, which illustrates human PARs.

eweitz commented 3 years ago

Per email, it sounds like you found a solution.