Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/smolkelab/Ribozyme_switch_generator
05 April 2024, 20:01:44 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • 03cd1e6
  • /
  • Fold_candidate_list.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:c24fba8b949e2fb34095f531932cdf96afe6dd80
origin badgedirectory badge
swh:1:dir:03cd1e63a34fff88a4a02cbcfcb82410c767095e
origin badgerevision badge
swh:1:rev:786f72a93791e6d2e7bd35b2bb1ee66ed21a1680
origin badgesnapshot badge
swh:1:snp:da3dc5b2a649f32bd92d0cb1221ac441b5156359

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 786f72a93791e6d2e7bd35b2bb1ee66ed21a1680 authored by Calvin M Schmidt on 25 May 2020, 20:45:40 UTC
Initial commit
Tip revision: 786f72a
Fold_candidate_list.py
import os
import Ribozyme_generation
import Util_functions
import pickle
import shutil

# Load in the list of sequences to fold
struct_file = open('seq_list.pkl', 'rb')
full_list = pickle.load(struct_file)

# Get the structure of the native ribozyme for comparison
five_HHRz = 'GCUGUCACCGGAUGUGCUUUCCGGUCUGAUGAGUCCGU'
three_HHRz = 'GAGGACGAAACAGC'
[ribozyme_parts, loops] = Ribozyme_generation.RNAStructure_get_reference_structures(five_HHRz + three_HHRz,
                                                                                 'ribozyme', five_HHRz)

print([ribozyme_parts, loops])

tuple_list = []
bar = Util_functions.ProgressBar(len(full_list))

for seq in full_list:

    if not os.path.exists("Test_ribozymes"):
        os.makedirs("Test_ribozymes")

    Ribozyme_generation.RNAStructure_minimal_generator(seq, 1, "Test_ribozymes/test")

    # Iterates through each tested ribozyme structure(teststruct) and finds ribozyme active and aptamer formed.
    testopen = open("Test_ribozymes/test.1.txt")
    testopen = testopen.readlines()

    # Gets the sequence of the loops for the sequence, if correctly folded.
    teststruct = ''
    if testopen != []:
        teststruct = testopen[2][:-1]
        [loops, stem_lengths] = Ribozyme_generation.get_ribozyme_loops(seq, teststruct, ribozyme_parts)

    else:
        [loops, stem_lengths] = [['', ''], [0, 0]]

    shutil.rmtree("Test_ribozymes")

    tuple_list.append((seq, [loops, stem_lengths], teststruct))

    bar.update()
    print(bar.get_bar())
    print(bar.get_time_remaining())

# Dumps list of sequences, folded structure, and loop sequences to a pickle file for storage and later analysis.
struct_file = open('Candidate_list_RNAs_min_structures.pkl', 'wb')
pickle.dump(tuple_list, struct_file)
struct_file.close()

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API