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

shine dalgarno fixes #2516

Merged
merged 16 commits into from
Oct 12, 2020
Merged

shine dalgarno fixes #2516

merged 16 commits into from
Oct 12, 2020

Conversation

nathandunn
Copy link
Contributor

@nathandunn nathandunn commented Sep 28, 2020

fixes #2515

  • Shine Dalgarno evidence should be moveable without a refresh
    • create a separate method that mimics set_exon_boundary without calculating the CDS
      • in AnnotTrack.js (842) switch for method to call set_shine_dalgarno_boundaries`
      • in AEC and RHS, create methods that mirror set_exon_boundaries called setShineDalgarnoBoundaries
      • om RHS method, should be the same, but looks for SD and mRNA explicitly and does not recalculate CDS or non-canonical splice site . . . conversely, we could use set_exon_boundaries and see if the method is a SD? . . . hmm
  • terminator should be moveable like RR and TE moved to unable to resize terminators manually #2521
  • clean

  • make sure that Shine Dalgarno has mRNA listed as a parent (the reverse is true)
  • GFF3 export should list mRNA as parent Shine Dalgarno
  • check with FASTA export
  • after a refresh, deletion of the Shine Dalgarno should not cause a problem or cause a refresh
  • deletion of gene with Shine Dalgarno should not cause a problem or cause a referesh

  • shine dalgarno should be a child of the mRNA, treat as a type of an exon
  • deletion of the Shine Dalgarno should not cause a problem or cause a refresh (this is true for the initial creation)
  • fix addition of Shine Dalgarno Canvas track
  • implement https://github.com/GMOD/Apollo/pull/2143/files to incorproate shine dalgarno explicitly (and include some other things) - which was reverted at some later point
  • allow changing of type (no)
  • allow independent creation

@nathandunn nathandunn changed the title some minor changes shine dalgarno fixes Oct 5, 2020
@nathandunn
Copy link
Contributor Author

So, when we create a the gene here from the Shine Dalgarno:

image

The input sub features are created correctly (mRNA with a child exon and Shine Dalgarno sequence):

  var afeat ;
                    console.log('getting into aadding mRNA features');
                    if(biotype === 'mRNA'){
                        featureToAdd = JSONUtils.handleCigarSubFeatures(featureToAdd,biotype);
                        afeat = JSONUtils.createApolloFeature(featureToAdd, biotype, true);
                        console.log('adding feature',featureToAdd,afeat)
                        featuresToAdd.push(afeat);
                    }

This is when we create a gene, which gets converted to an identical mRNA.

However, createApolloFeature properly calculates the Shine Dalgarno, but for the exon it adds a sub exon and a sub CDS, neither of which we want.

@nathandunn
Copy link
Contributor Author

input sequence:

{"track":"ACHIV102_cov_229.2","features":[{"location":{"fmin":20957,"fmax":22306,"strand":1},"type":{"cv":{"name":"sequence"},"name":"mRNA"},"name":"ACHIV102_cov_229.2.orf00043","orig_id":"ACHIV102_cov_229.2.orf00043","children":[{"location":{"fmin":20957,"fmax":20960,"strand":1},"type":{"cv":{"name":"sequence"},"name":"shine_dalgarno_sequence"},"orig_id":"ACHIV102_cov_229.2.cds_orf00043.rbs-0"},{"location":{"fmin":20968,"fmax":22306,"strand":1},"type":{"cv":{"name":"sequence"},"name":"exon"},"orig_id":"ACHIV102_cov_229.2.orf00043.exon","children":[{"location":{"fmin":20968,"fmax":22306,"strand":1},"type":{"cv":{"name":"sequence"},"name":"CDS"}}]}]}],"operation":"add_transcript","clientToken":"9755865001478805356695905165"}

return value:

{"features":[{"owner":"ndunn@me.com","parent_name":"ACHIV102_cov_229.2.orf00043","uniquename":"abca13e0-6693-44c5-9835-f856fac54c2d","type":{"cv":{"name":"sequence"},"name":"mRNA"},"parent_type":{"cv":{"name":"sequence"},"name":"gene"},"date_creation":1602283010350,"sequence":"ACHIV102_cov_229.2","children":[{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"abca13e0-6693-44c5-9835-f856fac54c2d-non_canonical_three_prime_splice_site-20968","type":{"cv":{"name":"sequence"},"name":"non_canonical_three_prime_splice_site"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283011020,"sequence":"ACHIV102_cov_229.2","parent_id":"abca13e0-6693-44c5-9835-f856fac54c2d","name":"abca13e0-6693-44c5-9835-f856fac54c2d-non_canonical_three_prime_splice_site-20968","location":{"strand":1,"id":967,"fmin":20968,"fmax":20968},"id":967,"properties":[],"date_last_modified":1602283011043},{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"f351ff97-c101-48a6-af7c-b959d8d3d7aa","type":{"cv":{"name":"sequence"},"name":"Shine_Dalgarno_sequence"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283010279,"sequence":"ACHIV102_cov_229.2","parent_id":"abca13e0-6693-44c5-9835-f856fac54c2d","name":"f351ff97-c101-48a6-af7c-b959d8d3d7aa","location":{"strand":1,"id":963,"fmin":20957,"fmax":20960},"id":963,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.cds_orf00043.rbs-0"}],"date_last_modified":1602283010315},{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"7d24352b-95e8-4a51-96c0-62ade478f757","type":{"cv":{"name":"sequence"},"name":"exon"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283010344,"sequence":"ACHIV102_cov_229.2","children":[{"owner":"None","parent_name":"7d24352b-95e8-4a51-96c0-62ade478f757","uniquename":"6f5bd196-2f94-4afd-80d2-191cb8e729e4","type":{"cv":{"name":"sequence"},"name":"CDS"},"parent_type":{"cv":{"name":"sequence"},"name":"exon"},"date_creation":1602283010337,"sequence":"ACHIV102_cov_229.2","parent_id":"7d24352b-95e8-4a51-96c0-62ade478f757","name":"6f5bd196-2f94-4afd-80d2-191cb8e729e4","location":{"strand":1,"id":965,"fmin":20968,"fmax":22306},"id":965,"properties":[],"date_last_modified":1602283010632}],"parent_id":"abca13e0-6693-44c5-9835-f856fac54c2d","name":"7d24352b-95e8-4a51-96c0-62ade478f757","location":{"strand":1,"id":964,"fmin":20968,"fmax":22306},"id":964,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.orf00043.exon"}],"date_last_modified":1602283010631},{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"abca13e0-6693-44c5-9835-f856fac54c2d-CDS","type":{"cv":{"name":"sequence"},"name":"CDS"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283010615,"sequence":"ACHIV102_cov_229.2","parent_id":"abca13e0-6693-44c5-9835-f856fac54c2d","name":"abca13e0-6693-44c5-9835-f856fac54c2d-CDS","location":{"strand":1,"is_fmin_partial":true,"id":966,"fmin":20968,"fmax":22306},"id":966,"properties":[],"date_last_modified":1602283010689}],"parent_id":"26dfb8a0-df3c-4cb7-9fa6-ec5d2f28fdb8","name":"ACHIV102_cov_229.2.orf00043-00001","location":{"strand":1,"id":962,"fmin":20957,"fmax":22306},"id":962,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.orf00043"}],"date_last_modified":1602283011055}],"sequenceAlterationEvent":false,"operation":"ADD"}

@nathandunn
Copy link
Contributor Author

Based on this, the return type is correct. gene -> mRNA -> (exon, SD, CDS, non-can SS)

The gff3 is:

##gff-version 3
##sequence-region ACHIV102_cov_229.2 1 42452
ACHIV102_cov_229.2	.	gene	20958	22306	.	+	.	owner=ndunn@me.com;ID=26dfb8a0-df3c-4cb7-9fa6-ec5d2f28fdb8;date_last_modified=2020-10-09;Name=ACHIV102_cov_229.2.orf00043;date_creation=2020-10-09
ACHIV102_cov_229.2	.	mRNA	20958	22306	.	+	.	owner=ndunn@me.com;Parent=26dfb8a0-df3c-4cb7-9fa6-ec5d2f28fdb8;ID=abca13e0-6693-44c5-9835-f856fac54c2d;orig_id=ACHIV102_cov_229.2.orf00043;date_last_modified=2020-10-09;Name=ACHIV102_cov_229.2.orf00043-00001;date_creation=2020-10-09
ACHIV102_cov_229.2	.	non_canonical_three_prime_splice_site	20969	20969	.	+	.	Parent=abca13e0-6693-44c5-9835-f856fac54c2d;ID=abca13e0-6693-44c5-9835-f856fac54c2d-non_canonical_three_prime_splice_site-20968;Name=abca13e0-6693-44c5-9835-f856fac54c2d-non_canonical_three_prime_splice_site-20968
ACHIV102_cov_229.2	.	Shine_Dalgarno_sequence	20958	20960	.	+	.	ID=f351ff97-c101-48a6-af7c-b959d8d3d7aa;orig_id=ACHIV102_cov_229.2.cds_orf00043.rbs-0;date_last_modified=2020-10-09;Name=f351ff97-c101-48a6-af7c-b959d8d3d7aa;date_creation=2020-10-09
ACHIV102_cov_229.2	.	exon	20969	22306	.	+	.	Parent=abca13e0-6693-44c5-9835-f856fac54c2d;ID=7d24352b-95e8-4a51-96c0-62ade478f757;Name=7d24352b-95e8-4a51-96c0-62ade478f757
ACHIV102_cov_229.2	.	CDS	20969	22306	.	+	0	Parent=abca13e0-6693-44c5-9835-f856fac54c2d;ID=abca13e0-6693-44c5-9835-f856fac54c2d-CDS;Name=abca13e0-6693-44c5-9835-f856fac54c2d-CDS
###

@nathandunn
Copy link
Contributor Author

getFeatures returns the correct mRNA and the Shine Dalgarno as well. I think the SD lacks a parent:

{"features":[{"owner":"ndunn@me.com","parent_name":"ACHIV102_cov_229.2.orf00043","uniquename":"d5b76d11-596c-4643-948c-9d10dd97c866","type":{"cv":{"name":"sequence"},"name":"mRNA"},"parent_type":{"cv":{"name":"sequence"},"name":"gene"},"date_creation":1602283363275,"sequence":"ACHIV102_cov_229.2","children":[{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"d5b76d11-596c-4643-948c-9d10dd97c866-non_canonical_three_prime_splice_site-20968","type":{"cv":{"name":"sequence"},"name":"non_canonical_three_prime_splice_site"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283363347,"sequence":"ACHIV102_cov_229.2","parent_id":"d5b76d11-596c-4643-948c-9d10dd97c866","name":"d5b76d11-596c-4643-948c-9d10dd97c866-non_canonical_three_prime_splice_site-20968","location":{"strand":1,"id":988,"fmin":20968,"fmax":20968},"id":988,"properties":[],"date_last_modified":1602283363355},{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"34a89e03-d2b7-4471-adce-86bd92817a49","type":{"cv":{"name":"sequence"},"name":"exon"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283363273,"sequence":"ACHIV102_cov_229.2","children":[{"owner":"None","parent_name":"34a89e03-d2b7-4471-adce-86bd92817a49","uniquename":"9b3731b3-4f72-4836-939b-c29aa86cc719","type":{"cv":{"name":"sequence"},"name":"CDS"},"parent_type":{"cv":{"name":"sequence"},"name":"exon"},"date_creation":1602283363271,"sequence":"ACHIV102_cov_229.2","parent_id":"34a89e03-d2b7-4471-adce-86bd92817a49","name":"9b3731b3-4f72-4836-939b-c29aa86cc719","location":{"strand":1,"id":986,"fmin":20968,"fmax":22306},"id":986,"properties":[],"date_last_modified":1602283363308}],"parent_id":"d5b76d11-596c-4643-948c-9d10dd97c866","name":"34a89e03-d2b7-4471-adce-86bd92817a49","location":{"strand":1,"id":985,"fmin":20968,"fmax":22306},"id":985,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.orf00043.exon"}],"date_last_modified":1602283363307},{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"40675c0f-41d9-4f67-8561-ddf2766ede0c","type":{"cv":{"name":"sequence"},"name":"Shine_Dalgarno_sequence"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283363253,"sequence":"ACHIV102_cov_229.2","parent_id":"d5b76d11-596c-4643-948c-9d10dd97c866","name":"40675c0f-41d9-4f67-8561-ddf2766ede0c","location":{"strand":1,"id":984,"fmin":20957,"fmax":20960},"id":984,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.cds_orf00043.rbs-0"}],"date_last_modified":1602283363263},{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"d5b76d11-596c-4643-948c-9d10dd97c866-CDS","type":{"cv":{"name":"sequence"},"name":"CDS"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283363299,"sequence":"ACHIV102_cov_229.2","parent_id":"d5b76d11-596c-4643-948c-9d10dd97c866","name":"d5b76d11-596c-4643-948c-9d10dd97c866-CDS","location":{"strand":1,"is_fmin_partial":true,"id":987,"fmin":20968,"fmax":22306},"id":987,"properties":[],"date_last_modified":1602283363318}],"parent_id":"56f03ae1-ea1d-4032-aab7-a48e9e5b180a","name":"ACHIV102_cov_229.2.orf00043-00001","location":{"strand":1,"id":983,"fmin":20957,"fmax":22306},"id":983,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.orf00043"}],"date_last_modified":1602283363360},{"owner":"None","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"40675c0f-41d9-4f67-8561-ddf2766ede0c","type":{"cv":{"name":"sequence"},"name":"Shine_Dalgarno_sequence"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602283363253,"sequence":"ACHIV102_cov_229.2","parent_id":"d5b76d11-596c-4643-948c-9d10dd97c866","name":"40675c0f-41d9-4f67-8561-ddf2766ede0c","location":{"strand":1,"id":984,"fmin":20957,"fmax":20960},"id":984,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.cds_orf00043.rbs-0"}],"date_last_modified":1602283363263}],"clientToken":"9755865001478805356695905165","track":"ACHIV102_cov_229.2","operation":"get_features"}

@nathandunn
Copy link
Contributor Author

For sending boundaries sending this:

{"track":"ACHIV102_cov_229.2","features":[{"uniquename":"76b20483-a63d-4d16-b64c-d6195325935e","location":{"fmin":20953,"fmax":20961}}],"operation":"set_boundaries","clientToken":"9755865001478805356695905165"}

and returning this:

{"features":[{"owner":"ndunn@me.com","parent_name":"ACHIV102_cov_229.2.orf00043-00001","uniquename":"76b20483-a63d-4d16-b64c-d6195325935e","type":{"cv":{"name":"sequence"},"name":"Shine_Dalgarno_sequence"},"parent_type":{"cv":{"name":"sequence"},"name":"mRNA"},"date_creation":1602286580182,"sequence":"ACHIV102_cov_229.2","parent_id":"f0a2ea96-6730-4014-93fc-ad8af83f5ad4","name":"76b20483-a63d-4d16-b64c-d6195325935e","location":{"strand":1,"id":1050,"fmin":20953,"fmax":20961},"id":1050,"properties":[{"name":"orig_id","type":{"cv":{"name":"feature_property"}},"value":"ACHIV102_cov_229.2.cds_orf00043.rbs-0"}],"date_last_modified":1602286583476}],"sequenceAlterationEvent":false,"operation":"UPDATE"}

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

Successfully merging this pull request may close these issues.

Dragging feature boundaries not working as expected for Shine-Dalgarno and CDS
1 participant