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

Export entire folder data to more detailed XML output formats in future releases? #64

Open
maxieds opened this issue Nov 28, 2019 · 2 comments
Assignees
Labels
Feature request feature that may be implemented in the future but is not currently on the to do list

Comments

@maxieds
Copy link
Contributor

maxieds commented Nov 28, 2019

This would be on the order of adding an "Export to XML" icon next to the folder name in the LHS MainWindow display for sequences (named by unique folder id). The output should include more detailed summaries of all of the loaded structures than we currently give in other supported output formats currently integrated in RNAStructViz.

For example, I recently added the following stub functions to RNAStructure.cpp/h which can be used to generate the strings we will want to store in the output XML file:

/* Functions to generate listings of substructural and pairing properties: */
        inline bool IsAmbiguous() {
             return strchr(GetSequenceString(), 'X') != NULL;
        }

        inline bool IsCanonical(bool skipAmbiguousPairs = false) {
             for(int bidx = 0; bidx < GetLength(); bidx++) {
                  const char bp1 = GetBaseAt(bidx)->getBaseChar(), bp2 = GetBaseAt(GetBaseAt(bidx)->m_pair)->getBaseChar();
                  if(skipAmbiguousPairs && (bp1 == 'X' || bp2 == 'X')) {
                       continue;
                  }
                  bool cpairs = (bp1 == 'A' && bp2 == 'G') || (bp1 == 'G' && bp2 == 'A') ||
                                (bp1 == 'G' && bp2 == 'U') || (bp1 == 'U' && bp2 == 'G') ||
                                (bp1 == 'G' && bp2 == 'C') || (bp1 == 'C' && bp2 == 'G');
                  if(!cpairs) {
                       return false;
                  }
             }
             return true;
        }

        static inline const char *DEFAULT_STRING_LIST_DELIMITER = "\n";

        std::string GetHelicesList(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
        std::string GetWatsonCrickPairs(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
        std::string GetCanonicalPairs(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
        std::string GetNonCanonicalPairs(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
        std::string GetPseudoKnots(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
        std::string GetWobblePairs(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
        std::string GetIsolatedPairs(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
        std::string GetNonIsolatedPairs(std::string strDelim = RNAStructure::DEFAULT_STRING_LIST_DELIMITER);
@maxieds
Copy link
Contributor Author

maxieds commented Nov 28, 2019

The output XML file can / should also contain the DOTBracket-formatted pairing data, the base (nucleotide sequence characters), sequence length, comments, information on file origin (e.g., where on disk did we load this structure data from), possible PostScript data for full radial-layout-style diagrams that are straightforward to generate with Vienna, etc.

@ceheitsch
Any other suggestions for output data we would want here?

@maxieds maxieds self-assigned this Nov 28, 2019
@maxieds
Copy link
Contributor Author

maxieds commented Dec 4, 2019

This is partially implemented as a place holder in the current GUI:

@maxieds maxieds added the TODO tasks to be completed label Feb 2, 2020
@maxieds maxieds mentioned this issue Jul 31, 2020
@maxieds maxieds added the Feature request feature that may be implemented in the future but is not currently on the to do list label Sep 8, 2020
@maxieds maxieds changed the title Feature request: Export entire folder data to more detailed XML output formats Export entire folder data to more detailed XML output formats in future releases? Sep 8, 2020
@maxieds maxieds removed the TODO tasks to be completed label Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request feature that may be implemented in the future but is not currently on the to do list
Projects
None yet
Development

No branches or pull requests

1 participant