Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a genetic map for Apis mellifera #1396

Open
janaobsteter opened this issue Oct 11, 2022 · 6 comments
Open

Adding a genetic map for Apis mellifera #1396

janaobsteter opened this issue Oct 11, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@janaobsteter
Copy link
Contributor

  • Name: Apis mellifera
  • Common name: honeybee

Other information: Genetic map
Hi! I am trying to add a genetic map to the honeybee, but I've ran in some issues.
So, I have the genetic map, which was done on microsatellites and then lifted onto the current honeybee assembly (this was done by some custom scripts by a collaborator).

However, now I have the positions and the genetic positions, but I don't have the recombination rate (the third column) - and my brain doesn't work so I don't know how to transform it (if I even can?). I do have the constant recombination rates from another paper (by chromosome), but I don't know whether that's ok?

Also, I don't know how to cite the custom scripts for transforming the microsatellite genetic map to SNP based genetic map?

I would appreciate any help on this!
Thanks!

@janaobsteter janaobsteter added the enhancement New feature or request label Oct 11, 2022
@petrelharp
Copy link
Contributor

Ah, great! Positions and genetic positions are okay: if the positions are pos (in bp) and the genetic positions are map (in cM) then the recombination rate (in cM/Mb) is

rate = 1e6 * np.diff(map) / np.diff(pos)

This will be one number too short, and so you add an extra 0.0 at the end. Is this enough for you to get it in there?

Also, I don't know how to cite the custom scripts for transforming the microsatellite genetic map to SNP based genetic map?

Let's see - so, you're going to cite the original publication, right? How long are the scripts? We do need to figure out how someone might QC this. If they are short you could just stick the scripts in the python file, commented out.

@janaobsteter
Copy link
Contributor Author

Gotcha, I think I can handle this! Another question - the chromosome names should be the same as in the "genome.py" file (the main name)?

Regarding the script - it's publicly available here on bitbucket, however, it is not mine (https://bitbucket.org/scriptBee/hapmap-pilot/src/main/GeneticMaps/, file create-geneticMap.R).

@janaobsteter
Copy link
Contributor Author

janaobsteter commented Oct 12, 2022

OK, I think I did it right - I've computed the rate from positions separately for each chromosome with the last value being zero.

for chromosome in range(1, 17):
    chrDF = gmap[gmap.Chromosome == chromosome]
    chrDF = chrDF.sort_values(by = "Position")
    chrDF.loc[:, "Rate"] = list(1e6 * np.diff(chrDF.Map) / np.diff(chrDF.Position)) + [0]
    if chromosome == 1:
        gmapDF = chrDF
    else:
        gmapDF = pd.concat([gmapDF, chrDF])

I've also used the chromosome names used in genome.py.

I've pushed it to my fork here: https://github.com/janaobsteter/stdpopsim/tree/main/stdpopsim/catalog/ApiMel

@petrelharp
Copy link
Contributor

That seems right. Perhaps you could make a pull request?

@janaobsteter
Copy link
Contributor Author

Created - #1399

@janaobsteter
Copy link
Contributor Author

OK! I've created the python file - I'm just waiting for some text. But I have another question - should the genetic map provide genetic positions for every base in the reference genome? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants