idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
141,600 | public boolean unmodifiedWithoutPhosphate ( ) { if ( getNotation ( ) == null ) { return true ; } else { if ( getNotation ( ) . contains ( "[" ) || getNotation ( ) . contains ( "X" ) ) { return false ; } else { return true ; } } } | Returns true if the nucleotide is unmodified except for a missing phosphate group . If the nucleotide notation is empty it returns true . |
141,601 | public Monomer getBaseMonomer ( MonomerStore monomerStore ) { String baseSymbol = getBaseSymbol ( ) ; if ( baseSymbol != null && ! baseSymbol . equalsIgnoreCase ( "" ) ) { try { Map < String , Monomer > monomers = monomerStore . getMonomers ( Monomer . NUCLIEC_ACID_POLYMER_TYPE ) ; Monomer m = monomers . get ( baseSymb... | get the base monomer the return value could be null if this nucleotide does not have a base |
141,602 | public Monomer getSugarMonomer ( MonomerStore monomerStore ) { String sugarSymbol = getSugarSymbol ( ) ; if ( sugarSymbol != null && ! sugarSymbol . equalsIgnoreCase ( "" ) ) { try { Map < String , Monomer > monomers = monomerStore . getMonomers ( Monomer . NUCLIEC_ACID_POLYMER_TYPE ) ; Monomer m = monomers . get ( sug... | get the sugar monomer the return value could be null if the nucleotide does not has a sugar |
141,603 | public String getLinkerNotation ( ) { String pSymbol = getPhosphateSymbol ( ) ; String result = null ; if ( null == pSymbol || pSymbol . length ( ) == 0 ) { result = "" ; } else { if ( pSymbol . length ( ) > 1 ) result = "[" + pSymbol + "]" ; else result = pSymbol ; } return result ; } | This method returns the HELM notation for nucleotide linker |
141,604 | public String getNucleosideNotation ( ) { int linkerLen = getLinkerNotation ( ) . length ( ) ; return notation . substring ( 0 , notation . length ( ) - linkerLen ) ; } | This method returns the HELM notation for nucleoside |
141,605 | public void addMonomer ( Monomer monomer , boolean dbChanged ) throws IOException , MonomerException { Map < String , Monomer > monomerMap = monomerDB . get ( monomer . getPolymerType ( ) ) ; String polymerType = monomer . getPolymerType ( ) ; String alternateId = monomer . getAlternateId ( ) ; String smilesString = mo... | Adds a monomer to the store and optionally sets the dbChanged flag |
141,606 | public boolean hasMonomer ( String polymerType , String alternateId ) { return ( ( monomerDB . get ( polymerType ) != null ) && getMonomer ( polymerType , alternateId ) != null ) ; } | Checks if a specific monomer exists in the store |
141,607 | public Monomer getMonomer ( String polymerType , String alternateId ) { Map < String , Monomer > map1 = monomerDB . get ( polymerType ) ; return monomerDB . get ( polymerType ) . get ( alternateId ) ; } | Returns the monomer specified by polymerType and alternatId |
141,608 | public synchronized void addNewMonomer ( Monomer monomer ) throws IOException , MonomerException { monomer . setNewMonomer ( true ) ; addMonomer ( monomer , true ) ; } | Adds a monomer to the store and makes it a temporary new monomer |
141,609 | public List < Monomer > getAllMonomersList ( ) { List < Monomer > monomers = new ArrayList < Monomer > ( ) ; for ( String polymerType : getPolymerTypeSet ( ) ) { Map < String , Monomer > map = getMonomers ( polymerType ) ; monomers . addAll ( map . values ( ) ) ; } return monomers ; } | This method returns all monomers of the store as list sorted by polymer type |
141,610 | public final static void addAnnotation ( final AnnotationNotation notation , final int position , final HELM2Notation helm2notation ) { helm2notation . getListOfAnnotations ( ) . add ( position , notation ) ; } | method to add an annotation at a specific position of the HELM2Notation |
141,611 | public final static void changeAnnotation ( final AnnotationNotation notation , final int position , final HELM2Notation helm2notation ) { helm2notation . getListOfAnnotations ( ) . set ( position , notation ) ; } | method to change an annotation at the position of the HELM2Notation |
141,612 | public final static void addConnection ( final ConnectionNotation notation , final int position , final HELM2Notation helm2notation ) { helm2notation . getListOfConnections ( ) . add ( position , notation ) ; } | method to add a new connection at the position of the HELM2Notation |
141,613 | public final static void changeConnection ( final int position , final ConnectionNotation notation , final HELM2Notation helm2notation ) { helm2notation . getListOfConnections ( ) . set ( position , notation ) ; } | method to change a connection at the position of the HELM2Notation |
141,614 | public final static void addAnnotationToConnection ( final int position , final String annotation , final HELM2Notation helm2notation ) { helm2notation . getListOfConnections ( ) . get ( position ) . setAnnotation ( annotation ) ; } | method to add an annotation to a connection of the HELM2Notation |
141,615 | public final static void addGroup ( final GroupingNotation notation , final int position , final HELM2Notation helm2notation ) { helm2notation . getListOfGroupings ( ) . add ( position , notation ) ; } | method to add a group to the grouping section of the HELM2Notation |
141,616 | public final static void changeGroup ( final GroupingNotation notation , final int position , final HELM2Notation helm2notation ) { helm2notation . getListOfGroupings ( ) . set ( position , notation ) ; } | method to change a group of the HELM2Notation |
141,617 | public final static PolymerNotation addAnnotationToPolymer ( final PolymerNotation polymer , final String annotation ) { if ( polymer . getAnnotation ( ) != null ) { return new PolymerNotation ( polymer . getPolymerID ( ) , polymer . getPolymerElements ( ) , polymer . getAnnotation ( ) + " | " + annotation ) ; } return... | method to add an annotation to a PolymerNotation |
141,618 | public final static PolymerNotation removeAnnotationOfPolmyer ( PolymerNotation polymer ) { return new PolymerNotation ( polymer . getPolymerID ( ) , polymer . getPolymerElements ( ) , null ) ; } | method to remove a current annotation of a PolymerNotation |
141,619 | public final static PolymerNotation addMonomerNotation ( int position , PolymerNotation polymer , MonomerNotation monomerNotation ) { polymer . getPolymerElements ( ) . getListOfElements ( ) . add ( position , monomerNotation ) ; return polymer ; } | method to add a new MonomerNotation to a PolymerNotation |
141,620 | public final static void changeMonomerNotation ( int position , PolymerNotation polymer , MonomerNotation not ) { polymer . getPolymerElements ( ) . getListOfElements ( ) . set ( position , not ) ; } | method to change the MonomerNotation on the specific position |
141,621 | public final static void deleteMonomerNotation ( int position , PolymerNotation polymer ) throws NotationException { MonomerNotation monomerNotation = polymer . getPolymerElements ( ) . getListOfElements ( ) . get ( position ) ; if ( polymer . getPolymerElements ( ) . getListOfElements ( ) . size ( ) == 1 ) { throw new... | method to delete a MonomerNotation at a specific position of the PolymerNotation |
141,622 | public final static void addAnnotationToMonomerNotation ( PolymerNotation polymer , int position , String annotation ) { polymer . getPolymerElements ( ) . getListOfElements ( ) . get ( position ) . setAnnotation ( annotation ) ; } | method to add an annotation to a MonomerNotation |
141,623 | public final static void addCountToMonomerNotation ( PolymerNotation polymer , int position , String count ) { polymer . getPolymerElements ( ) . getListOfElements ( ) . get ( position ) . setCount ( count ) ; } | method to set the count of a MonomerNotation |
141,624 | public final static void deleteAnnotationFromMonomerNotation ( PolymerNotation polymer , int position ) { polymer . getPolymerElements ( ) . getListOfElements ( ) . get ( position ) . setAnnotation ( null ) ; } | method to delete the annotation of a MonomerNotation |
141,625 | public final static void changePolymerNotation ( int position , PolymerNotation polymer , HELM2Notation helm2notation ) { helm2notation . getListOfPolymers ( ) . set ( position , polymer ) ; } | method to change the PolymerNotation at a specific position of the HELM2Notation |
141,626 | public final static void addPolymerNotation ( int position , PolymerNotation polymer , HELM2Notation helm2notation ) { helm2notation . getListOfPolymers ( ) . add ( position , polymer ) ; } | method to add a PolymerNotation at a specific position of the HELM2Notation |
141,627 | public final static void replaceMonomer ( HELM2Notation helm2notation , String polymerType , String existingMonomerID , String newMonomerID ) throws NotationException , MonomerException , ChemistryException , CTKException , IOException , JDOMException { validateMonomerReplacement ( polymerType , existingMonomerID , new... | method to replace the MonomerID with the new MonomerID for a given polymer type |
141,628 | public final static MonomerNotation replaceMonomerNotation ( MonomerNotation monomerNotation , String existingMonomerID , String newMonomerID ) throws NotationException , ChemistryException , CTKException , MonomerLoadingException { if ( monomerNotation instanceof MonomerNotationUnitRNA ) { List < String > result = gen... | method to replace the MonomerNotation having the MonomerID with the new MonomerID |
141,629 | public final static MonomerNotationGroup replaceMonomerNotationGroup ( MonomerNotationGroup monomerNotation , String existingMonomerID , String newMonomerID ) throws NotationException { MonomerNotationGroup newObject = null ; boolean hasChanged = false ; StringBuilder sb = new StringBuilder ( ) ; String id = "" ; for (... | method to replace the MonomerNotationGroup having the MonomerID with the new MonomerID |
141,630 | public final static MonomerNotationUnit produceMonomerNotationUnitWithOtherID ( MonomerNotation monomerNotation , String newID ) throws NotationException { MonomerNotationUnit result = new MonomerNotationUnit ( newID , monomerNotation . getType ( ) ) ; if ( monomerNotation . isAnnotationTrue ( ) ) { result . setAnnotat... | method to replace the MonomerNotationUnit having the MonomerID with the new MonomerID |
141,631 | public final static MonomerNotationList replaceMonomerNotationList ( MonomerNotationList object , String existingMonomerID , String newMonomerID ) throws NotationException , ChemistryException , CTKException , MonomerLoadingException { MonomerNotationList newObject = null ; boolean hasChanged = false ; StringBuilder sb... | method to replace the MonomerNotationList having the MonomerID with the new MonomerID |
141,632 | private final static String generateIDMonomerNotation ( String id , String count , String annotation ) { if ( id . length ( ) > 1 ) { id = "[" + id + "]" ; } String result = id ; try { if ( ! ( Integer . parseInt ( count ) == 1 ) ) { result += "'" + count + "'" ; } } catch ( NumberFormatException e ) { result += "'" + ... | method to generate the MonomerNotation in String format |
141,633 | private final static String generateIDRNA ( String id , String count , String annotation ) throws MonomerLoadingException , ChemistryException , CTKException { String result = id ; if ( result . startsWith ( "[" ) && result . endsWith ( "]" ) ) { result = id . substring ( 1 , id . length ( ) - 1 ) ; } if ( MonomerFacto... | method to generate the MonomerNotation for a RNA |
141,634 | private final static List < String > generateIDForNucleotide ( MonomerNotationUnitRNA object , String existingMonomerID , String newMonomerID ) throws MonomerLoadingException , ChemistryException , CTKException { List < String > result = new ArrayList < String > ( ) ; String hasChanged = null ; StringBuilder sb = new S... | method to replace the MonomerNotationUnitRNA having the MonomerID with the new MonomerID |
141,635 | private static String generateGroupElement ( String id , List < Double > list ) { StringBuilder sb = new StringBuilder ( ) ; if ( list . size ( ) == 1 ) { if ( list . get ( 0 ) == - 1.0 ) { sb . append ( id + ":" ) ; sb . append ( "?" + "-" ) ; } else if ( list . get ( 0 ) == 1.0 ) { sb . append ( id + ":" ) ; } else {... | method to generate the MonomerNotationGroupElement in String format |
141,636 | public static final void replaceSMILESWithTemporaryIds ( HELM2Notation helm2notation ) throws NotationException , HELM2HandledException , ChemistryException , CTKException , MonomerLoadingException , JDOMException { for ( int i = 0 ; i < helm2notation . getListOfPolymers ( ) . size ( ) ; i ++ ) { MethodsMonomerUtils . ... | This function replaces smiles in complex notation with temporary ids |
141,637 | public static void hybridize ( HELM2Notation helm2notation ) throws NotationException , RNAUtilsException , HELM2HandledException , org . helm . notation2 . exception . NotationException , ChemistryException { if ( HELM2NotationUtils . getAllBasePairConnections ( helm2notation . getListOfConnections ( ) ) . isEmpty ( )... | this method will automatically add base pair info into notation only if it contains two RNA polymer notations and there is no base pairing info |
141,638 | public void setApplicationMap ( final Map < String , Object > applicationMap ) { JKThreadLocal . setValue ( JKContextConstants . APPLICATION_MAP , applicationMap ) ; } | Sets the application map . |
141,639 | public void setRequestMap ( final Map < String , Object > requestMap ) { JKThreadLocal . setValue ( JKContextConstants . HTTP_REQUEST_MAP , requestMap ) ; } | Sets the request map . |
141,640 | public void setSessionMap ( final Map < String , Object > sessionMap ) { JKThreadLocal . setValue ( JKContextConstants . HTTP_SESSION_MAP , sessionMap ) ; } | Sets the session map . |
141,641 | private static String compress ( String str ) throws EncoderException { ByteArrayOutputStream rstBao = null ; GZIPOutputStream zos = null ; try { rstBao = new ByteArrayOutputStream ( ) ; zos = new GZIPOutputStream ( rstBao ) ; zos . write ( str . getBytes ( ) ) ; IOUtils . closeQuietly ( zos ) ; byte [ ] bytes = rstBao... | method to compress the given molfile in a gezipped Base64 string |
141,642 | private static String decompress ( String str ) throws EncoderException { byte [ ] bytes = Base64 . decodeBase64 ( str ) ; GZIPInputStream zi = null ; try { zi = new GZIPInputStream ( new ByteArrayInputStream ( bytes ) ) ; InputStreamReader reader = new InputStreamReader ( zi ) ; BufferedReader in = new BufferedReader ... | method to decompress the given molfile input |
141,643 | public MemoryFileAttributes addDir ( EightyPath dir , Principals principals ) { if ( content . get ( dir ) . isPresent ( ) ) { throw new IllegalArgumentException ( "path exists already" ) ; } if ( ! dir . isAbsolute ( ) || dir . getParent ( ) == null ) { throw new IllegalArgumentException ( "path not absolute or withou... | todo default to root ? |
141,644 | public static Map < String , Attachment > loadAttachments ( InputStream in ) throws IOException { ObjectMapper mapper = new ObjectMapper ( ) ; TypeReference < TreeMap < String , Attachment > > typeRef = new TypeReference < TreeMap < String , Attachment > > ( ) { } ; TreeMap < String , Attachment > attachments ; try { a... | reads the attachments from the given inputstream and returns the attachment db |
141,645 | public static boolean validateAttachment ( Attachment currentAttachment ) { try { currentAttachment . getId ( ) ; if ( currentAttachment . getAlternateId ( ) == "null" || currentAttachment . getAlternateId ( ) . isEmpty ( ) ) { return false ; } if ( currentAttachment . getCapGroupName ( ) == "null" || currentAttachment... | validates the current attachment |
141,646 | public static void checkAllowedPrivilige ( final JKPrivilige privilige ) { logger . debug ( "checkAllowedPrivilige() : " , privilige ) ; final JKAuthorizer auth = getAuthorizer ( ) ; auth . checkAllowed ( privilige ) ; } | Check allowed privilige . |
141,647 | public static boolean matchPassword ( String plain , JKUser user ) { JK . implementMe ( ) ; return JKSecurityUtil . encode ( plain ) . equals ( user . getPassword ( ) ) ; } | Match password . |
141,648 | public static JKPrivilige createPrivilige ( String name , JKPrivilige parent , int number ) { logger . trace ( "createPriviligeObject(): Id : " , ".name" , name , ", Parent:[" , parent , "] , " , number ) ; JKPrivilige p = new JKPrivilige ( name , parent , number ) ; p . setDesc ( p . getFullName ( ) ) ; return p ; } | Creates the privilige . |
141,649 | public static HELM2Notation readPeptide ( String notation ) throws FastaFormatException , NotationException , ChemistryException { HELM2Notation helm2notation = new HELM2Notation ( ) ; PolymerNotation polymer = new PolymerNotation ( "PEPTIDE1" ) ; helm2notation . addPolymer ( new PolymerNotation ( polymer . getPolymerI... | method to read a peptide sequence and generate a HELM2Notation object of it |
141,650 | public static String getPeptideSequenceFromNotation ( HELM2Notation helm2notation ) throws HELM2HandledException , PeptideUtilsException , org . helm . notation2 . exception . NotationException , ChemistryException { List < PolymerNotation > polymers = helm2notation . getListOfPolymers ( ) ; StringBuffer sb = new Strin... | method to get for all peptides the sequence |
141,651 | public static String getNucleotideNaturalAnalogSequenceFromNotation ( HELM2Notation helm2Notation ) throws NotationException , HELM2HandledException , ChemistryException { List < PolymerNotation > polymers = helm2Notation . getListOfPolymers ( ) ; StringBuffer sb = new StringBuffer ( ) ; for ( PolymerNotation polymer :... | method to generate for all rna polymers the natural analogue sequence |
141,652 | public static String getPeptideNaturalAnalogSequenceFromNotation ( HELM2Notation helm2Notation ) throws HELM2HandledException , PeptideUtilsException , NotationException , ChemistryException { List < PolymerNotation > polymers = helm2Notation . getListOfPolymers ( ) ; StringBuffer sb = new StringBuffer ( ) ; for ( Poly... | method to generate for all peptide polymers the natural analogue sequence |
141,653 | public static void setDefaultExecutor ( Executor executor ) { Class < ? > c = null ; Field field = null ; try { c = Class . forName ( "android.os.AsyncTask" ) ; field = c . getDeclaredField ( "sDefaultExecutor" ) ; field . setAccessible ( true ) ; field . set ( null , executor ) ; field . setAccessible ( false ) ; } ca... | set the default Executor |
141,654 | public static Executor getDefaultExecutor ( ) { Executor exec = null ; Class < ? > c = null ; Field field = null ; try { c = Class . forName ( "android.os.AsyncTask" ) ; field = c . getDeclaredField ( "sDefaultExecutor" ) ; field . setAccessible ( true ) ; exec = ( Executor ) field . get ( null ) ; field . setAccessibl... | get the default Executor |
141,655 | public static Nucleotide convertToNucleotide ( String id , boolean last ) throws MonomerException , org . helm . notation2 . exception . NotationException , ChemistryException , NucleotideLoadingException , NotationException { Map < String , String > reverseNucMap = NucleotideFactory . getInstance ( ) . getReverseNucle... | method to convert an string to an nucleotide |
141,656 | public static boolean validateSimpleNotationForRNA ( String polymerNotation ) throws org . helm . notation2 . parser . exceptionparser . NotationException { getMonomerIDListFromNucleotide ( polymerNotation ) ; return true ; } | validate RNA simple notation |
141,657 | public void dragged ( IEventMotion e ) { if ( paletteDiagram . getSelectedCommand ( ) == ECommands . SELECT . toString ( ) ) { if ( ! itWasDragging ) { itWasDragging = asmDiagramUml . tryToDragging ( e . getX ( ) , e . getY ( ) ) ; } else { asmDiagramUml . tryToDragging ( e . getX ( ) , e . getY ( ) ) ; } } } | Move an UML element or change path of a relation |
141,658 | public static HELM2Notation generatePeptidePolymersFromFASTAFormatHELM1 ( String fasta ) throws FastaFormatException , ChemistryException { helm2notation = new HELM2Notation ( ) ; if ( null == fasta ) { LOG . error ( "Peptide Sequence must be specified" ) ; throw new FastaFormatException ( "Peptide Sequence must be spe... | method to read the information from a FastaFile - Format + generate peptide polymers be careful it produces only polymers in the HELM1 standard no ambiguity |
141,659 | private static void initMapNucleotides ( ) throws FastaFormatException { try { nucleotides = NucleotideFactory . getInstance ( ) . getNucleotideTemplates ( ) . get ( "HELM Notation" ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; LOG . error ( "NucleotideFactory can not be initialized" ) ; throw new FastaForm... | method to initialize map of existing nucleotides in the database |
141,660 | private static void initMapTransformNucleotides ( ) { transformNucleotides = new HashMap < String , String > ( ) ; for ( Map . Entry e : nucleotides . entrySet ( ) ) { transformNucleotides . put ( e . getValue ( ) . toString ( ) , e . getKey ( ) . toString ( ) ) ; } } | method to initialize map of transform nucleotides |
141,661 | private static void initMapNucleotidesNaturalAnalog ( ) throws FastaFormatException , ChemistryException { try { nucleotidesNaturalAnalog = MonomerFactory . getInstance ( ) . getMonomerDB ( ) . get ( "RNA" ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; LOG . error ( "Nucleotides can not be initialized" ) ; t... | method to initialize map of existing nucleotides with the natural analog sequence in the database |
141,662 | private static void initMapAminoAcid ( ) throws FastaFormatException , ChemistryException { try { aminoacids = MonomerFactory . getInstance ( ) . getMonomerDB ( ) . get ( "PEPTIDE" ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; LOG . error ( "AminoAcids can not be initialized" ) ; throw new FastaFormatExcept... | method to initialize map of existing amino acids in the database |
141,663 | protected static String generateFastaFromPeptide ( List < Monomer > monomers ) { StringBuilder fasta = new StringBuilder ( ) ; for ( Monomer monomer : monomers ) { fasta . append ( monomer . getNaturalAnalog ( ) ) ; } return fasta . toString ( ) ; } | method to generate Fasta for a list of peptide monomers |
141,664 | public static String generateFastaFromRNAPolymer ( List < PolymerNotation > polymers ) throws FastaFormatException , ChemistryException { StringBuilder fasta = new StringBuilder ( ) ; for ( PolymerNotation polymer : polymers ) { String header = polymer . getPolymerID ( ) . getId ( ) ; if ( polymer . getAnnotation ( ) !... | method to generate Fasta for rna polymers |
141,665 | protected static String generateFastaFromRNA ( List < Monomer > monomers ) { StringBuilder fasta = new StringBuilder ( ) ; for ( Monomer monomer : monomers ) { if ( monomer . getMonomerType ( ) . equals ( Monomer . BRANCH_MOMONER_TYPE ) ) { fasta . append ( monomer . getNaturalAnalog ( ) ) ; } } return fasta . toString... | method to generate Fasta for a list of rna monomers |
141,666 | public static String generateFasta ( HELM2Notation helm2Notation2 ) throws FastaFormatException , ChemistryException { List < PolymerNotation > polymersPeptides = new ArrayList < PolymerNotation > ( ) ; List < PolymerNotation > polymerNucleotides = new ArrayList < PolymerNotation > ( ) ; StringBuilder fasta = new Strin... | method to generate for the whole HELM2Notation fasta - files it contains fasta for all rna and peptides |
141,667 | public static HELM2Notation convertIntoAnalogSequence ( HELM2Notation helm2Notation ) throws FastaFormatException , AnalogSequenceException , ChemistryException , CTKException { initMapAminoAcid ( ) ; initMapNucleotides ( ) ; initMapNucleotidesNaturalAnalog ( ) ; initMapTransformNucleotides ( ) ; List < PolymerNotation... | method to convert all Peptides and RNAs into the natural analogue sequence and generates HELM2Notation |
141,668 | private static PolymerNotation convertPeptideIntoAnalogSequence ( PolymerNotation polymer ) throws AnalogSequenceException { for ( int i = 0 ; i < polymer . getPolymerElements ( ) . getListOfElements ( ) . size ( ) ; i ++ ) { polymer . getPolymerElements ( ) . getListOfElements ( ) . set ( i , generateMonomerNotationPe... | method to convert the sequence of a PolymerNotation into the natural analogue sequence |
141,669 | private static MonomerNotation generateMonomerNotationRNA ( MonomerNotation current ) throws AnalogSequenceException { MonomerNotation change = null ; try { if ( current instanceof MonomerNotationUnit ) { change = new MonomerNotationUnit ( changeIdForRNA ( current ) , current . getType ( ) ) ; } else if ( current insta... | method to change the MonomerNotation in its analogue |
141,670 | private static PolymerNotation convertRNAIntoAnalogSequence ( PolymerNotation polymer ) throws AnalogSequenceException { for ( int i = 0 ; i < polymer . getPolymerElements ( ) . getListOfElements ( ) . size ( ) ; i ++ ) { polymer . getPolymerElements ( ) . getListOfElements ( ) . set ( i , generateMonomerNotationRNA ( ... | method to generate the sequence of a rna PolymerNotation into its natural analogue sequence |
141,671 | private static String changeIdForRNA ( MonomerNotation monomerNotation ) { if ( monomerNotation instanceof MonomerNotationUnitRNA ) { StringBuilder changeid = new StringBuilder ( ) ; for ( MonomerNotation not : ( ( MonomerNotationUnitRNA ) monomerNotation ) . getContents ( ) ) { Monomer monomer = nucleotidesNaturalAnal... | method to get the natural analogue sequence of a MonomerNotation |
141,672 | private boolean checkHostPart ( final String label , final Problems problems , final String compName ) { boolean result = true ; if ( label . length ( ) > 63 ) { problems . add ( ValidationBundle . getMessage ( HostNameValidator . class , "LABEL_TOO_LONG" , label ) ) ; result = false ; } if ( label . length ( ) == 0 ) ... | Check host part . |
141,673 | public static String getMacAddress ( ) { try { List < String > macAddress = new ArrayList < String > ( ) ; Enumeration < NetworkInterface > enumNetWorkInterface = NetworkInterface . getNetworkInterfaces ( ) ; while ( enumNetWorkInterface . hasMoreElements ( ) ) { NetworkInterface netWorkInterface = enumNetWorkInterface... | Gets the physical active mac address . |
141,674 | public static Properties getSystemInfo ( ) { logger . debug ( "getSystemInfo()" ) ; if ( MachineInfo . systemInfo == null ) { if ( ! JKIOUtil . isWindows ( ) ) { throw new IllegalStateException ( "this feature is only supported on windows" ) ; } final byte [ ] sourceFileContents = JKIOUtil . readFileAsByteArray ( "/nat... | Gets the system info . |
141,675 | public static Class < ? > getExceptionCallerClass ( final Throwable t ) { final StackTraceElement [ ] stackTrace = t . getStackTrace ( ) ; for ( final StackTraceElement stackTraceElement : stackTrace ) { logger . debug ( stackTraceElement . getClassName ( ) . concat ( "." ) . concat ( stackTraceElement . getMethodName ... | Gets the exception caller class . |
141,676 | public static String getMainClassName ( ) { StackTraceElement trace [ ] = Thread . currentThread ( ) . getStackTrace ( ) ; if ( trace . length > 0 ) { return trace [ trace . length - 1 ] . getClassName ( ) ; } return "Unknown" ; } | Gets the main class name . |
141,677 | public static HELM2Notation getSiRNANotation ( String senseSeq , String antiSenseSeq ) throws NotationException , FastaFormatException , HELM2HandledException , RNAUtilsException , org . helm . notation2 . exception . NotationException , ChemistryException , CTKException , NucleotideLoadingException { return getSirnaNo... | this method converts nucleotide sequences into HELM2Notation |
141,678 | public static HELM2Notation getSirnaNotation ( String senseSeq , String antiSenseSeq , String rnaDesignType ) throws NotationException , FastaFormatException , HELM2HandledException , RNAUtilsException , org . helm . notation2 . exception . NotationException , ChemistryException , CTKException , NucleotideLoadingExcept... | this method converts nucleotide sequences into HELM notation based on design pattern |
141,679 | private static List < ConnectionNotation > hybridization ( PolymerNotation one , PolymerNotation two , String rnaDesignType ) throws NotationException , HELM2HandledException , RNAUtilsException , org . helm . notation2 . exception . NotationException , ChemistryException , NucleotideLoadingException { List < Connectio... | method to generate a List of ConnectionNotation according to the given two polymerNotations and the rnaDesigntype |
141,680 | private static List < ConnectionNotation > hybridizationWithLengthFromStart ( PolymerNotation one , PolymerNotation two , String senseAnalogSeq , String antisenseAnalogSeq , int lengthFromStart ) throws NotationException { List < ConnectionNotation > connections = new ArrayList < ConnectionNotation > ( ) ; ConnectionNo... | method to generate a List of ConnectionNotations given the two PolymerNotations and the sequences and the start point |
141,681 | private static boolean validateSiRNADesign ( PolymerNotation one , PolymerNotation two , String rnaDesignType ) throws RNAUtilsException , HELM2HandledException , NotationException , ChemistryException { if ( NucleotideParser . RNA_DESIGN_NONE . equalsIgnoreCase ( rnaDesignType ) ) { return true ; } if ( ! NucleotidePa... | validates the required siRNA |
141,682 | public synchronized Map < String , Map < String , Monomer > > getMonomerDB ( boolean includeNewMonomers ) { if ( includeNewMonomers ) { return monomerDB ; } else { Map < String , Map < String , Monomer > > reducedMonomerDB = new TreeMap < String , Map < String , Monomer > > ( String . CASE_INSENSITIVE_ORDER ) ; for ( S... | returns the monomer database including monomers that where temporary marked as new else without those monomers |
141,683 | public static MonomerFactory getInstance ( ) throws MonomerLoadingException , ChemistryException { if ( null == instance ) { refreshMonomerCache ( ) ; } else if ( MonomerStoreConfiguration . getInstance ( ) . isUseWebservice ( ) && MonomerStoreConfiguration . getInstance ( ) . isUpdateAutomatic ( ) ) { refreshMonomerCa... | Initialize MonomerCache and returns the singleton Factory class |
141,684 | public synchronized void addNewMonomer ( Monomer monomer ) throws IOException , MonomerException { monomer . setNewMonomer ( true ) ; addMonomer ( monomerDB , smilesMonomerDB , monomer ) ; dbChanged = true ; } | To add new monomer into monomerCache |
141,685 | public MonomerCache buildMonomerCacheFromXML ( String monomerDBXML ) throws MonomerException , IOException , JDOMException , ChemistryException , CTKException { ByteArrayInputStream bais = new ByteArrayInputStream ( monomerDBXML . getBytes ( ) ) ; return buildMonomerCacheFromXML ( bais ) ; } | Build an MonomerCache object with monomerDBXML String |
141,686 | public synchronized void merge ( MonomerCache remoteMonomerCache ) throws IOException , MonomerException { Map < Monomer , Monomer > conflicts = getConflictedMonomerMap ( remoteMonomerCache ) ; if ( conflicts . size ( ) > 0 ) { throw new MonomerException ( "Local new monomer and remote monomer database conflict found" ... | merge remote monomerCache with local monomerCache will throw exception if conflicts found . Client needs to resolve conflicts prior to calling merge |
141,687 | public synchronized void setMonomerCache ( MonomerCache remoteMonomerCache ) throws IOException , MonomerException { monomerDB = remoteMonomerCache . getMonomerDB ( ) ; attachmentDB = remoteMonomerCache . getAttachmentDB ( ) ; smilesMonomerDB = remoteMonomerCache . getSmilesMonomerDB ( ) ; dbChanged = true ; } | replace local cache with remote one completely may cause loss of data |
141,688 | private static Map < String , Attachment > buildAttachmentDB ( ) throws IOException { Map < String , Attachment > map = new TreeMap < String , Attachment > ( String . CASE_INSENSITIVE_ORDER ) ; if ( MonomerStoreConfiguration . getInstance ( ) . isUseExternalAttachments ( ) ) { map = AttachmentLoader . loadAttachments (... | builds attachment db from default file or external file |
141,689 | public void saveMonomerCache ( ) throws IOException , MonomerException { File f = new File ( NOTATION_DIRECTORY ) ; if ( ! f . exists ( ) ) { f . mkdir ( ) ; } MonomerCache cache = new MonomerCache ( ) ; cache . setMonomerDB ( getMonomerDB ( false ) ) ; cache . setAttachmentDB ( getAttachmentDB ( ) ) ; cache . setSmile... | save monomerCache to disk file |
141,690 | public static void scan ( final Class < ? extends Annotation > clas , final String [ ] basePackage , final AnnotationHandler handler ) { final ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider ( false ) ; scanner . setResourceLoader ( new PathMatchingResourcePatternRe... | Utility method to scan the given package and handler for the annotation of the given class . Its uses the Spring annotation detector |
141,691 | public static List < String > scanAsList ( final Class < ? extends Annotation > clas , final String ... basePackage ) { final List < String > classes = new ArrayList < > ( ) ; scan ( clas , basePackage , new AnnotationHandler ( ) { public void handleAnnotationFound ( String className ) { classes . add ( className ) ; }... | Scan as list . |
141,692 | public void refreshGuiAndShowFile ( File file ) { if ( rootNode . getChildCount ( ) > 0 ) { rootNode . removeAllChildren ( ) ; treeModel . reload ( ) ; } if ( guiMain . getAsmProjectUml ( ) . getProjectUml ( ) != null ) { addTreeNodes ( file ) ; guiMain . getMenuMain ( ) . setVisibleProjectMenu ( true ) ; } else { guiM... | refresh tree and expand to file that usually newly created |
141,693 | public static String buildToString ( Object ... params ) { StringBuffer finalMessage = new StringBuffer ( ) ; int i = 0 ; for ( Object object : params ) { if ( i ++ > 0 ) { finalMessage . append ( FIELD_SEPARATOR ) ; } if ( object instanceof List < ? > ) { finalMessage . append ( JKCollectionUtil . toString ( ( List < ... | Builds the to string . |
141,694 | public static Map toMap ( Object [ ] keys , Object [ ] values ) { Map map = new HashMap < > ( ) ; int i = 0 ; for ( Object key : keys ) { map . put ( key , values [ i ++ ] ) ; } return map ; } | To map . |
141,695 | public static void validateNull ( String name , Object object ) { if ( object == null ) { throw new IllegalStateException ( name . concat ( " cannot be null" ) ) ; } } | Validate null . |
141,696 | public static void addToSystemConfig ( String prefix , Properties prop ) { for ( Entry < Object , Object > entry : prop . entrySet ( ) ) { String key = prefix . concat ( entry . getKey ( ) . toString ( ) ) ; String value = entry . getValue ( ) . toString ( ) ; System . setProperty ( key , value ) ; } } | Adds the to system config . |
141,697 | public static char [ ] readPassword ( String msg ) { Console console = System . console ( ) ; if ( console != null ) { return console . readPassword ( ) ; } scanner = getScanner ( ) ; System . out . print ( msg ) ; return scanner . nextLine ( ) . toCharArray ( ) ; } | Read password . |
141,698 | public static void printOnce ( Object msg ) { if ( messagesCache . get ( msg . hashCode ( ) ) == null ) { JK . printBlock ( msg ) ; messagesCache . put ( msg . hashCode ( ) , msg ) ; } } | Print the message and then save it into list to avoid reporing it again it can be helpfull to debugging purposes . |
141,699 | public static String getAppName ( ) { String appName = System . getProperty ( JKContextConstants . JK_APP_NAME ) ; if ( appName == null ) { String mainClassName = JKDebugUtil . getMainClassName ( ) ; return mainClassName . substring ( 0 , mainClassName . lastIndexOf ( "." ) ) ; } return appName ; } | Gets the app name . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.