<jupyter_start><jupyter_text>RNArtist demo-----If you haven't used one of these notebooks before, they're basically web pages in which you can write, edit, and run live code. They're meant to encourage experimentation, so don't feel nervous. Just try running a few cells and see what happens!.    Some tips:            Code cells have boxes around them. When you hover over them an  icon appears.        To run a code cell either click the  icon, or click on the cell and then hit Shift+Enter. The Shift+Enter combo will also move you to the next cell, so it's a quick way to work through the notebook.        While a cell is running a * appears in the square brackets next to the cell. Once the cell has finished running the asterix will be replaced with a number.        In most cases you'll want to start from the top of notebook and work your way down running each cell in turn. Later cells might depend on the results of earlier ones.        To edit a code cell, just click on it and type stuff. Remember to run the cell once you've finished editing.    ---- Example of first 'real_example' in documentationFirst example here takes an example from early in documentation that makes a vector graphics version of a file provided in th `media` directory.  First the notebook commands will switch to that directory.   Then they save a script there (`first_demo.kts`) and run it.<jupyter_code>%cd RNArtistCore/
ls
s = '''rnartist {
  file = "media/real_example.svg"
  ss {
    rna {
      sequence = "CAACAUCAUACGUACUGCGCCCAAGCGUAACGCGAACACCACGAGUGGUGACUGGUGCUUG"
    }
    bracket_notation =
      "(((..(((..(((..(((((....)))))..)))..(((((....)))))..)))...)))"
  }
  theme {
    details_lvl = 5

    color {
      type="A"
      value = "#A0ECF5"
    }

    color {
      type="a"
      value = "black"
    }

    color {
      type="U"
      value = "#9157E5"
    }

    color {
      type="G"
      value = "darkgreen"
    }

    color {
      type="C"
      value = "#E557E5"
    }

  }
}
'''
%store s >first_demo.kts
%%bash
java -jar target/rnartistcore-0.2.7-SNAPSHOT-jar-with-dependencies.jar first_demo.kts<jupyter_output>WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jetbrains.kotlin.com.intellij.util.ReflectionUtil (file:/home/jovyan/RNArtistCore/target/rnartistcore-0.2.7-SNAPSHOT-jar-with-dependencies.jar) to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of org.jetbrains.kotlin.com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release<jupyter_text>That should have resulted in making the file `real_example.svg` in the `media` directory. Let's check we see it there.<jupyter_code>ls media<jupyter_output>3way_1_A.png                            details_lvl5_colored_A.png
3way_2_A.png                            gradient_A.png
3way_3_A.png                            helix_combination_details_A.png
3way_4_A.png                            helix_details1_A.png
3way_5_A.png                            helix_details2_A.png
3way_6_A.png                            helix_details3_A.png
3way_full_details_A.png                 helix_details4_A.png
all_red_A.png                           helix_details5_A.png
booquet_from_ct_A.png                   helix_details6_A.png
booquet_from_pdb_0.png                  hide_purines_A.png
booquet_from_rfam_AJ009730.1_1-133.png  hide_pyrimidines_A.png
booquet_from_vienna_A.png               kotlin_powered_A.png
dataset_A.png                           layout_explanation.png
dataset_hide_A.png                      lines_A.png
details_lvl1_A.png                      partially_detailed_A.png
details_lvl2_A.png                      real_example_A.png
de[...]<jupyter_text>Viewing the result:<jupyter_code>from IPython.core.display import SVG #<-- this line only needs to be run once per notebook
SVG(filename='media/real_example_A.svg')<jupyter_output><empty_output><jupyter_text>First example currently in the documentation.This will run the script that currently is shown at the very top of the directions. This needs a PDB file that isn't present yet. That will be fetched first and then the rest of the process is much as above.<jupyter_code>!curl -OL https://files.rcsb.org/download/1ehz.pdb # see https://nbviewer.jupyter.org/github/fomightez/Python_basics_on_PDB_file/blob/master/index.ipynb for more information on that curl command
!mv 1ehz.pdb media/.
ls
z = '''import io.github.fjossinet.rnartist.core.*

rnartist {
  file = "media/another_example.svg"
  ss {
    rna {
      sequence = "CAACAUCAUACGUACUGCGCCCAAGCGUAACGCGAACACCACGAGUGGUGACUGGUGCUUG"
    }
    bracket_notation =
      "(((..(((..(((..(((((....)))))..)))..(((((....)))))..)))...)))"
  }
  theme {
    details_lvl = 5

    color {
      type="A"
      value = "#A0ECF5"
    }

    color {
      type="a"
      value = "black"
    }

    color {
      type="U"
      value = "#9157E5"
    }

    color {
      type="G"
      value = "darkgreen"
    }

    color {
      type="C"
      value = "#E557E5"
    }

  }


  rnartist {
    file = "media/example2.svg"
    
    ss {
        pdb {
            file = "media/1ehz.pdb"
        }    
    }
  }
}'''
%store z >second_demo.kts
%%bash
java -jar target/rnartistcore-0.2.7-SNAPSHOT-jar-with-dependencies.jar second_demo.kts<jupyter_output>WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jetbrains.kotlin.com.intellij.util.ReflectionUtil (file:/home/jovyan/RNArtistCore/target/rnartistcore-0.2.7-SNAPSHOT-jar-with-dependencies.jar) to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of org.jetbrains.kotlin.com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.io.FileNotFoundException: /home/jovyan/RNArtistCore/media/1ehz.pdb.xml (No such file or directory)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
	at java.base/su[...]<jupyter_text>View the two files that should have been made:<jupyter_code>ls media
from IPython.core.display import SVG #<-- this line only needs to be run once per notebook
SVG(filename='media/another_example_A.svg')
from IPython.core.display import SVG #<-- this line only needs to be run once per notebook
SVG(filename='example2.svg')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0973310124746156, 'fraction_numerical': 0.012474615607774877, 'mean_word_length': 2.98094688221709, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 22, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '545998', 'license': 'MIT', 'n_tokens_mistral': 2274, 'n_tokens_neox': 2183, 'n_words': 605, 'path': 'RNArtist demo.ipynb', 'repo_name': 'fomightez/RNArtistCore-binder', 'size': '6894'}