Menu

#39 Impossible to merge a new transcript with an existing one

chado-apollo
open
Editing (52)
6
2015-02-22
2005-12-06
No

1/ create a new transcript just aside an existing one.
So we have a temp transcript (Tt) and an existing
transcript (Te).
2/Merge the two transcript and keep the name of the
existing transcript. It is a way for a user to add
exons to a transcript by extending it's range.
3/Commit to chado and boom.

The problem was that if the exons are moved to the new
transcript and that the user wants to keep the old
name, apollo tries to delete the old and transfer its
information to the new one. First problem, apollo gets
mad on this process. Second problem, we delete an
existing gene while the user likely will was simply to
extend the existing one.

To correct this, I propose a modification of
AnnotationEditor which ensure in this case that the
annotations are moved to the existing gene.

------------------------------------
private void mergeTranscripts(Vector transcripts) {
Transcript tran1 = (Transcript)transcripts.elementAt(0);
Transcript tran2 = (Transcript)transcripts.elementAt(1);

// if we merge transcripts then we have to check
that any other
// overlapping transcripts are also pulled into the
same gene
// NOTE: This is now done in consolidateGenes.
System.out.println ("\n\t****** MERGING TRANSCRIPTS
******");

/* moveExonsToTrans is the same functionality of
merging trans so reuse it
have to clone feature vector as the exons gets
deleted from transcript
as the the vector is iterated - but shouldnt
there be 2 separate events?
MERGE TRANSCRIPT, and MERGE EXONS? also
wont this cloning throw things like drawables? */
moveExonsToTranscript(tran1,

(Vector)tran2.getFeatures().clone(),
"merge transcripts");
}
++++++++++++++++++++++++++++++++
private void mergeTranscripts(Vector transcripts) {
Transcript tran1 = (Transcript)transcripts.elementAt(0);
Transcript tran2 = (Transcript)transcripts.elementAt(1);

// if we merge transcripts then we have to check
that any other
// overlapping transcripts are also pulled into the
same gene
// NOTE: This is now done in consolidateGenes.
System.out.println ("\n\t****** MERGING TRANSCRIPTS
******");

/* moveExonsToTrans is the same functionality of
merging trans so reuse it
have to clone feature vector as the exons gets
deleted from transcript
as the the vector is iterated - but shouldnt
there be 2 separate events?
MERGE TRANSCRIPT, and MERGE EXONS? also
wont this cloning throw things like drawables? */
+ //URGI : for saving into chado and if the user is
merging a temp transcript with an existing transcript,
+ //get sure that the exons of the temp trans get
moved to the existing and not the contrary
+ if (isTemp(tran1) && ! isTemp(tran2)){
+ tran2=(Transcript)transcripts.elementAt(0);
+ tran1=(Transcript)transcripts.elementAt(1);
+ }
//END URGI
moveExonsToTranscript(tran1,

(Vector)tran2.getFeatures().clone(),
"merge transcripts");
}

Discussion

  • Mark Gibson

    Mark Gibson - 2005-12-06

    Logged In: YES
    user_id=422804

    so this facet of this bug seems fixed by cyrils change here
    (other facet is reducing temp names in dialog in bug 241) -
    so cyril i would say commit this and then its resolved fixed
    right? your changes seem good - are they ready to commit -
    does it work?

     
  • Mark Gibson

    Mark Gibson - 2005-12-06
    • labels: --> Editing
    • milestone: --> chado-apollo
    • priority: 5 --> 6
    • assigned_to: nobody --> cpommier_gmod
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.