# HG changeset patch
# User rnateam
# Date 1720731383 0
# Node ID 02b0ecc34d9ae3817c5f0f6ee8fc79dbf3ce30de
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/rnaformer commit ee837e8d27a53baa3d4881412d4fbc566ae06499
diff -r 000000000000 -r 02b0ecc34d9a infer_rnaformer.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/infer_rnaformer.xml Thu Jul 11 20:56:23 2024 +0000
@@ -0,0 +1,212 @@
+
+ Predict the secondary structure of an RNA with RNAformer
+
+ macros.xml
+
+
+ biopython
+
+ '$output'
+]]>
+
+ 0.5
+
+ pos_id = torch.where(pred_mat == True)
+ pos1_id = pos_id[0].cpu().tolist()
+ pos2_id = pos_id[1].cpu().tolist()
+ predicted_structure = f"Pairing index 1: {pos1_id} \nPairing index 2: {pos2_id}"
+ print(predicted_structure)
+
+ seqlen = len(sample['src_seq'])
+ dot_bracket =['.'] * seqlen
+ for i in range(len(pos1_id)):
+ open_index = pos1_id[i]
+ close_index = pos2_id[i]
+
+ if 0 <= open_index < len(dot_bracket) and 0 <= close_index < len(dot_bracket):
+ if dot_bracket[open_index] == '.' and dot_bracket[close_index] == '.':
+ dot_bracket[open_index] = '('
+ dot_bracket[close_index] = ')'
+ dot_bracket_str_pred = ''.join(dot_bracket)
+
+
+
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r 02b0ecc34d9a macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Thu Jul 11 20:56:23 2024 +0000
@@ -0,0 +1,16 @@
+
+ RNAformer
+ 1.0.0
+ 22.05
+
+
+ rnaformer
+
+
+
+
+
+ 10.1101/2024.02.12.579881
+
+
+
\ No newline at end of file
diff -r 000000000000 -r 02b0ecc34d9a test-data/fasta_input1.fa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fasta_input1.fa Thu Jul 11 20:56:23 2024 +0000
@@ -0,0 +1,4 @@
+>Anolis_caro_chrUn_GL343590.trna2_AlaAGC (218800-218872) Ala (AGC) 73 bp Sc: 49.55
+UGGGAAUUAGCUCAAAUGGUAGAGCGCUCGCUUAGCAUGUGAGAGGUAGUGGGAUCGAUGCCCACAUUCUCCA
+>Anolis_caro_chrUn_GL343207.trna3_AlaAGC (1513626-1513698) Ala (AGC) 73 bp Sc: 56.15
+GGGGAAUUAGCUCAAAUGGUAGAGCGCUCGCUUAGCAUGCGAGAGGUAGCGGGAUUGAUGCCCGCAUUCUCCA
diff -r 000000000000 -r 02b0ecc34d9a test-data/rna_2d_pred_FASTA.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rna_2d_pred_FASTA.txt Thu Jul 11 20:56:23 2024 +0000
@@ -0,0 +1,4 @@
+Pairing index 1: [0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 8, 9, 9, 10, 11, 12, 13, 13, 17, 18, 20, 21, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71]
+Pairing index 2: [71, 70, 69, 68, 67, 66, 65, 13, 14, 20, 47, 22, 24, 44, 23, 22, 21, 7, 20, 54, 55, 7, 12, 45, 8, 11, 10, 9, 43, 42, 41, 40, 39, 38, 37, 36, 32, 31, 30, 29, 28, 27, 26, 25, 9, 21, 64, 63, 62, 61, 60, 57, 17, 18, 53, 52, 51, 50, 49, 48, 6, 5, 4, 3, 2, 1, 0]
+Pairing index 1: [0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 8, 9, 9, 10, 11, 12, 13, 13, 14, 20, 20, 21, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 48, 49, 50, 51, 52, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71]
+Pairing index 2: [71, 70, 69, 68, 67, 66, 65, 13, 14, 20, 22, 24, 44, 23, 22, 21, 7, 20, 7, 7, 13, 12, 45, 8, 11, 10, 9, 43, 42, 41, 40, 39, 38, 37, 32, 31, 30, 29, 28, 27, 26, 25, 9, 21, 64, 63, 62, 61, 60, 52, 51, 50, 49, 48, 6, 5, 4, 3, 2, 1, 0]
diff -r 000000000000 -r 02b0ecc34d9a test-data/rna_2d_pred_text.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rna_2d_pred_text.txt Thu Jul 11 20:56:23 2024 +0000
@@ -0,0 +1,2 @@
+Pairing index 1: [0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 17, 18, 21, 21, 22, 23, 23, 24, 25, 39, 40, 42, 43, 44, 48, 49, 50, 53, 54, 55, 56, 57, 58, 59, 60, 62, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76]
+Pairing index 2: [76, 75, 74, 73, 72, 71, 70, 13, 21, 23, 25, 24, 23, 22, 7, 59, 60, 7, 13, 12, 8, 11, 10, 9, 30, 29, 50, 49, 48, 44, 43, 42, 69, 68, 67, 66, 65, 62, 17, 18, 58, 57, 56, 55, 54, 53, 6, 5, 4, 3, 2, 1, 0]