Repository: pachterlab/gget (language: python)

Issue:
Dev -> main



Discussion / hints:

Fix patch:
diff --git a/docs/src/en/updates.md b/docs/src/en/updates.md
index 64ab8239..1617a5d1 100644
--- a/docs/src/en/updates.md
+++ b/docs/src/en/updates.md
@@ -1,11 +1,12 @@
 ## ✨ What's new  
-**Version ≥ 0.28.6** (May 31, 2024):  
+**Version ≥ 0.28.6** (Jun 2, 2024):  
 - **New module: [`gget mutate`](./mutate.md)**
 - [`gget cosmic`](./cosmic.md): You can now download entire COSMIC databases using the argument `download_cosmic` argument
 - [`gget ref`](./ref.md): Can now fetch the GRCh27 genome assembly using `species='human_grch37'`
 - [`gget search`](./search.md): Adjust access of human data to the structure of Ensembl release 112 (fixes [issue 129](https://github.com/pachterlab/gget/issues/129))
 
-~~**Version ≥ 0.28.5** (May 29, 2024):~~ Yanked due to logging bug in `gget.setup("alphafold")`
+~~**Version ≥ 0.28.5** (May 29, 2024):~~ 
+- Yanked due to logging bug in `gget.setup("alphafold")` + inversion mutations in `gget mutate` only reverse the string instead of also computing the complementary strand
   
 **Version ≥ 0.28.4** (January 31, 2024):  
 - [`gget setup`](./setup.md): Fix bug with filepath when running `gget.setup("elm")` on Windows OS.  
diff --git a/docs/src/es/updates.md b/docs/src/es/updates.md
index 13c2befb..a5c8d304 100644
--- a/docs/src/es/updates.md
+++ b/docs/src/es/updates.md
@@ -1,11 +1,12 @@
 ## ✨ ¡Lo más reciente!  
-**Versión ≥ 0.28.6 (31 de mayo de 2024):**
+**Versión ≥ 0.28.6 (2 de junio de 2024):**
 - **Nuevo módulo: [`gget mutate`](./mutate.md)**
 - [`gget cosmic`](./cosmic.md): Ahora puedes descargar bases de datos completas de COSMIC utilizando el argumento `download_cosmic`
 - [`gget ref`](./ref.md): Ahora puede obtener la ensambladura del genoma GRCh27 usando `species='human_grch37'`
 - [`gget search`](./search.md): Ajusta el acceso a los datos humanos a la estructura de la versión 112 de Ensembl (corrige [issue 129](https://github.com/pachterlab/gget/issues/129))
 
-~~**Version ≥ 0.28.5** (May 29, 2024):~~ Retirado debido a un error con 'logging' en `gget.setup("alphafold")`
+~~**Version ≥ 0.28.5** (May 29, 2024):~~ 
+- Retirado debido a un error con 'logging' en `gget.setup("alphafold")` + mutaciones de inversión en `gget mutate` solo invierten la cadena en lugar de también calcular la hebra complementaria
 
 **Versión ≥ 0.28.4** (31 de enero de 2024):  
 - [`gget setup`](./setup.md): soluciona el error con la ruta del archivo al ejecutar `gget.setup("elm")` en el sistema operativo Windows.  
diff --git a/gget/__init__.py b/gget/__init__.py
index 85af5f9a..8baf60b2 100644
--- a/gget/__init__.py
+++ b/gget/__init__.py
@@ -21,6 +21,6 @@
 # Mute numexpr threads info
 logging.getLogger("numexpr").setLevel(logging.WARNING)
 
-__version__ = "0.28.5"
+__version__ = "0.28.6"
 __author__ = "Laura Luebbert"
 __email__ = "lauralubbert@gmail.com"


Test patch:
diff --git a/tests/fixtures/test_info.json b/tests/fixtures/test_info.json
index 87919607..e1248501 100644
--- a/tests/fixtures/test_info.json
+++ b/tests/fixtures/test_info.json
@@ -552,7 +552,7 @@
                 "FUNDC1",
                 "FUNDC1-202",
                 [],
-                "Acts as an activator of hypoxia-induced mitophagy, an important mechanism for mitochondrial quality control",
+                "",
                 [
                     "Mitochondrion outer membrane"
                 ],
@@ -573,7 +573,7 @@
                 [
                     "NARC1"
                 ],
-                "Crucial player in the regulation of plasma cholesterol homeostasis. Binds to low-density lipid receptor family members: low density lipoprotein receptor (LDLR), very low density lipoprotein receptor (VLDLR), apolipoprotein E receptor (LRP1/APOER) and apolipoprotein receptor 2 (LRP8/APOER2), and promotes their degradation in intracellular acidic compartments (PubMed:18039658). Acts via a non-proteolytic mechanism to enhance the degradation of the hepatic LDLR through a clathrin LDLRAP1/ARH-mediated pathway. May prevent the recycling of LDLR from endosomes to the cell surface or direct it to lysosomes for degradation. Can induce ubiquitination of LDLR leading to its subsequent degradation (PubMed:18799458, PubMed:17461796, PubMed:18197702, PubMed:22074827). Inhibits intracellular degradation of APOB via the autophagosome/lysosome pathway in a LDLR-independent manner. Involved in the disposal of non-acetylated intermediates of BACE1 in the early secretory pathway (PubMed:18660751). Inhibits epithelial Na(+) channel (ENaC)-mediated Na(+) absorption by reducing ENaC surface expression primarily by increasing its proteasomal degradation. Regulates neuronal apoptosis via modulation of LRP8/APOER2 levels and related anti-apoptotic signaling pathways",
+                "Crucial player in the regulation of plasma cholesterol homeostasis. Binds to low-density lipid receptor family members: low density lipoprotein receptor (LDLR), very low density lipoprotein receptor (VLDLR), apolipoprotein E receptor (LRP1/APOER) and apolipoprotein receptor 2 (LRP8/APOER2), and promotes their degradation in intracellular acidic compartments (PubMed:18039658). Acts via a non-proteolytic mechanism to enhance the degradation of the hepatic LDLR through a clathrin LDLRAP1/ARH-mediated pathway. May prevent the recycling of LDLR from endosomes to the cell surface or direct it to lysosomes for degradation. Can induce ubiquitination of LDLR leading to its subsequent degradation (PubMed:17461796, PubMed:18197702, PubMed:18799458, PubMed:22074827). Inhibits intracellular degradation of APOB via the autophagosome/lysosome pathway in a LDLR-independent manner. Involved in the disposal of non-acetylated intermediates of BACE1 in the early secretory pathway (PubMed:18660751). Inhibits epithelial Na(+) channel (ENaC)-mediated Na(+) absorption by reducing ENaC surface expression primarily by increasing its proteasomal degradation. Regulates neuronal apoptosis via modulation of LRP8/APOER2 levels and related anti-apoptotic signaling pathways",
                 [
                     "Cytoplasm",
                     "Secreted",
@@ -1151,4 +1151,4 @@
         },
         "expected_result": null
     }
-}
+}
\ No newline at end of file
diff --git a/tests/fixtures/test_seq.json b/tests/fixtures/test_seq.json
index 5cfb0c61..bfa8dc2f 100644
--- a/tests/fixtures/test_seq.json
+++ b/tests/fixtures/test_seq.json
@@ -124,7 +124,7 @@
             "translate": true
         },
         "expected_result": [
-            ">ENST00000506502 uniprot_id: U3KPZ7 ensembl_id: ENST00000506502 gene_name: nan organism: Homo sapiens sequence_length: 1027",
+            ">ENST00000506502 uniprot_id: U3KPZ7 ensembl_id: ENST00000506502 gene_name: LOC127814297 organism: Homo sapiens sequence_length: 1027",
             "MLIEDVDALKSWLAKLLEPICDADPSALANYVVALVKKDKPEKELKAFCADQLDVFLQKETSGFVDKLFESLYTKNYLPLLEPVKPEPKPLVQEKEEIKEEVFQEPAEEERDGRKKKYPSPQKTRSESSERRTREKKREDGKWRDYDRYYERNELYREKYDWRRGRSKSRSKSRGLSRSRSRSRGRSKDRDPNRNVEHRERSKFKSERNDLESSYVPVSAPPPNSSEQYSSGAQSIPSTVTVIAPAHHSENTTESWSNYYNNHSSSNSFGRNLPPKRRCRDYDERGFCVLGDLCQFDHGNDPLVVDEVALPSMIPFPPPPPGLPPPPPPGMLMPPMPGPGPGPGPGPGPGPGPGPGPGHSMRLPVPQGHGQPPPSVVLPIPRPPITQSSLINSRDQPGTSAVPNLASVGTRLPPPLPQNLLYTVSEHTYEPDGYNPEAPSITSSGRSQYRQFFSRTQTQRPNLIGLTSGDMDVNPRAANIVIQTEPPVPVSINSNITRVVLEPDSRKRAMSGLEGPLTKKPWLGKQGNNNQNKPGFLRKNQYTNTKLEVKKIPQELNNITKLNEHFSKFGTIVNIQVAFKGDPEAALIQYLTNEEARKAISSTEAVLNNRFIRVLWHRENNEQPTLQSSAQLLLQQQQTLSHLSQQHHHLPQHLHQQQVLVAQSAPSTVHGGIQKMMSKPQTSGAYVLNKVPVKHRLGHAGGNQSDASHLLNQSGGAGEDCQIFSTPGHPKMIYSSSNLKTPSKLCSGSKSHDVQEVLKKKQEAMKLQQDMRKKRQEVLEKQIECQKMLISKLEKNKNMKPEERANIMKTLKELGEKISQLKDELKTSSAVSTPSKVKTKTEAQKELLDTELDLHKRLSSGEDTTELRKKLSQLQVEAARLGILPVGRGKTMSSQGRGRGRGRGGRGRGSLNHMVVDHRPKALTVGGFIEEEKEDLLQHFSMEFCSCCPGWSAMVRSRLTATSASLVQVILLPQPPKQLRLQEREDDGHELQAAFRHAPGAARTQILQSALWLRGHAPSLSPSPAGT"
         ]
     }
diff --git a/tests/test_info.py b/tests/test_info.py
index 024b9937..9e622e00 100644
--- a/tests/test_info.py
+++ b/tests/test_info.py
@@ -11,25 +11,25 @@
 class TestInfo(unittest.TestCase):
     maxDiff = None
 
-    def test_info_WB_transcript(self):
-        test = "test2"
-        expected_result = info_dict[test]["expected_result"]
-        result_to_test = info(**info_dict[test]["args"])
-        # If result is a DataFrame, convert to list
-        if isinstance(result_to_test, pd.DataFrame):
-            result_to_test = result_to_test.dropna(axis=1).values.tolist()
+    # def test_info_WB_transcript(self):
+    #     test = "test2"
+    #     expected_result = info_dict[test]["expected_result"]
+    #     result_to_test = info(**info_dict[test]["args"])
+    #     # If result is a DataFrame, convert to list
+    #     if isinstance(result_to_test, pd.DataFrame):
+    #         result_to_test = result_to_test.dropna(axis=1).values.tolist()
 
-        self.assertListEqual(result_to_test, expected_result)
+    #     self.assertListEqual(result_to_test, expected_result)
 
-    def test_info_FB_gene(self):
-        test = "test3"
-        expected_result = info_dict[test]["expected_result"]
-        result_to_test = info(**info_dict[test]["args"])
-        # If result is a DataFrame, convert to list
-        if isinstance(result_to_test, pd.DataFrame):
-            result_to_test = result_to_test.dropna(axis=1).values.tolist()
+    # def test_info_FB_gene(self):
+    #     test = "test3"
+    #     expected_result = info_dict[test]["expected_result"]
+    #     result_to_test = info(**info_dict[test]["args"])
+    #     # If result is a DataFrame, convert to list
+    #     if isinstance(result_to_test, pd.DataFrame):
+    #         result_to_test = result_to_test.dropna(axis=1).values.tolist()
 
-        self.assertListEqual(result_to_test, expected_result)
+    #     self.assertListEqual(result_to_test, expected_result)
 
     def test_info_gene(self):
         test = "test4"
@@ -111,59 +111,59 @@ def test_info_ncbifalse_uniprotfalse(self):
 
         self.assertListEqual(result_to_test, expected_result)
 
-    def test_info_ensembl_only(self):
-        test = "test13"
-        expected_result = info_dict[test]["expected_result"]
-        result_to_test = info(**info_dict[test]["args"])
-        # If result is a DataFrame, convert to list
-        if isinstance(result_to_test, pd.DataFrame):
-            result_to_test = result_to_test.dropna(axis=1).values.tolist()
+    # def test_info_ensembl_only(self):
+    #     test = "test13"
+    #     expected_result = info_dict[test]["expected_result"]
+    #     result_to_test = info(**info_dict[test]["args"])
+    #     # If result is a DataFrame, convert to list
+    #     if isinstance(result_to_test, pd.DataFrame):
+    #         result_to_test = result_to_test.dropna(axis=1).values.tolist()
 
-        self.assertListEqual(result_to_test, expected_result)
+    #     self.assertListEqual(result_to_test, expected_result)
 
     def test_info_bad_id(self):
         test = "none_test1"
         result_to_test = info(**info_dict[test]["args"])
         self.assertIsNone(result_to_test, "Invalid argument return is not None.")
 
-    # Expected result not part of the unittest dictionary because of the unittest.mock.ANY entries
-    def test_info_WB_gene(self):
-        test = "test1"
-        result_to_test = info(**info_dict[test]["args"])
-        # If result is a DataFrame, convert to list
-        if isinstance(result_to_test, pd.DataFrame):
-            result_to_test = result_to_test.dropna(axis=1).values.tolist()
+    # # Expected result not part of the unittest dictionary because of the unittest.mock.ANY entries
+    # def test_info_WB_gene(self):
+    #     test = "test1"
+    #     result_to_test = info(**info_dict[test]["args"])
+    #     # If result is a DataFrame, convert to list
+    #     if isinstance(result_to_test, pd.DataFrame):
+    #         result_to_test = result_to_test.dropna(axis=1).values.tolist()
 
-        expected_result = [
-            [
-                "WBGene00043981",
-                "Q5WRS0",
-                "caenorhabditis_elegans",
-                "WBcel235",
-                "aaim-1",
-                "T14E8.4",
-                [],
-                "Protein aaim-1",
-                "Uncharacterized protein [Source:NCBI gene;Acc:3565421]",
-                "(Microbial infection) Promotes infection by microsporidian pathogens such as N.parisii in the early larval stages of development (PubMed:34994689). Involved in ensuring the proper orientation and location of the spore proteins of N.parisii during intestinal cell invasion (PubMed:34994689) Plays a role in promoting resistance to bacterial pathogens such as P.aeruginosa by inhibiting bacterial intestinal colonization",
-                ["Secreted"],
-                "Gene",
-                "protein_coding",
-                "T14E8.4.1.",
-                "X",
-                -1,
-                6559466,
-                6562428,
-                ["T14E8.4.1"],
-                ["protein_coding"],
-                [unittest.mock.ANY],
-                [-1],
-                [6559466],
-                [6562428],
-            ]
-        ]
+    #     expected_result = [
+    #         [
+    #             "WBGene00043981",
+    #             "Q5WRS0",
+    #             "caenorhabditis_elegans",
+    #             "WBcel235",
+    #             "aaim-1",
+    #             "T14E8.4",
+    #             [],
+    #             "Protein aaim-1",
+    #             "Uncharacterized protein [Source:NCBI gene;Acc:3565421]",
+    #             "(Microbial infection) Promotes infection by microsporidian pathogens such as N.parisii in the early larval stages of development (PubMed:34994689). Involved in ensuring the proper orientation and location of the spore proteins of N.parisii during intestinal cell invasion (PubMed:34994689) Plays a role in promoting resistance to bacterial pathogens such as P.aeruginosa by inhibiting bacterial intestinal colonization",
+    #             ["Secreted"],
+    #             "Gene",
+    #             "protein_coding",
+    #             "T14E8.4.1.",
+    #             "X",
+    #             -1,
+    #             6559466,
+    #             6562428,
+    #             ["T14E8.4.1"],
+    #             ["protein_coding"],
+    #             [unittest.mock.ANY],
+    #             [-1],
+    #             [6559466],
+    #             [6562428],
+    #         ]
+    #     ]
 
-        self.assertListEqual(result_to_test, expected_result)
+    #     self.assertListEqual(result_to_test, expected_result)
 
     def test_info_gene_list_non_model(self):
         test = "test5"
diff --git a/tests/test_seq.py b/tests/test_seq.py
index af51a9e0..9e1b8a9c 100644
--- a/tests/test_seq.py
+++ b/tests/test_seq.py
@@ -16,26 +16,26 @@ def test_seq_gene(self):
 
         self.assertListEqual(result_to_test, expected_result)
 
-    def test_seq_transcript_gene_WB(self):
-        test = "test2"
-        expected_result = seq_dict[test]["expected_result"]
-        result_to_test = seq(**seq_dict[test]["args"])
+    # def test_seq_transcript_gene_WB(self):
+    #     test = "test2"
+    #     expected_result = seq_dict[test]["expected_result"]
+    #     result_to_test = seq(**seq_dict[test]["args"])
 
-        self.assertListEqual(result_to_test, expected_result)
+    #     self.assertListEqual(result_to_test, expected_result)
 
-    def test_seq_transcript_transcript_WB(self):
-        test = "test3"
-        expected_result = seq_dict[test]["expected_result"]
-        result_to_test = seq(**seq_dict[test]["args"])
+    # def test_seq_transcript_transcript_WB(self):
+    #     test = "test3"
+    #     expected_result = seq_dict[test]["expected_result"]
+    #     result_to_test = seq(**seq_dict[test]["args"])
 
-        self.assertListEqual(result_to_test, expected_result)
+    #     self.assertListEqual(result_to_test, expected_result)
 
-    def test_seq_transcript_gene_WB_iso(self):
-        test = "test4"
-        expected_result = seq_dict[test]["expected_result"]
-        result_to_test = seq(**seq_dict[test]["args"])
+    # def test_seq_transcript_gene_WB_iso(self):
+    #     test = "test4"
+    #     expected_result = seq_dict[test]["expected_result"]
+    #     result_to_test = seq(**seq_dict[test]["args"])
 
-        self.assertListEqual(result_to_test, expected_result)
+    #     self.assertListEqual(result_to_test, expected_result)
 
     def test_seq_transcript_gene(self):
         test = "test5"
@@ -78,7 +78,7 @@ def test_seq_transcript_transcript_iso(self):
         result_to_test = seq(**seq_dict[test]["args"])
 
         self.assertListEqual(result_to_test, expected_result)
-    
+
     def test_seq_missing_uniprot_gene_name(self):
         test = "test11"
         expected_result = seq_dict[test]["expected_result"]