Bioinformatics package
0
0
Entering edit mode
20 months ago
zainabi8077 ▴ 20

I'm attempting to create a python GUI for analysing tRNA-Seq data that can run on Linux and Windows. It is necessary to run several applications, such as bowtie2, samtools, or bedtools, which can be readily downloaded by anaconda on Linux but is a pain on Windows. Because these apps cannot be obtained on Windows, I had to install Windows Subsystem for Linux (WSL) and attempt to download using this method.

I wrote the following Python script (anaconda setup.py) to do this:

import os

#Download the file for Linux, altough this script will run only on Windows Subsystem for Linux
os.system('curl -O https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh')
#Checking the integrity of the file
os.system('sha256sum Anaconda3-2020.07-Linux-x86_64.sh')
#Running the .sh script
os.system('bash Anaconda3-2020.07-Linux-x86_64.sh')
#Compiling from source
os.system('source ~/.bashrc')
os.system('Anaconda3-2020.07-Linux-x86_64.sh')
#Using conda to install bowtie2, samtools and bedtools
os.system('conda install -c bioconda bowtie2')
os.system('conda install -c bioconda samtools')
os.system('conda install -c bioconda bedtools')

Then, in the main script, I use the following code to call the other script:

import os
...
os.system("wsl python3 anaconda_setup.py")

This anaconda is successfully installed, but I'm not sure if it's installed on Windows or on WSL. But I got the following error

sh: 1: no source found conda: not found sh: 1 conda: not found sh: 1 conda: not found sh: 1

On the other side, I've joined WSL through CMD and can execute conda.exe and conda manually, but not automatically. Furthermore, I can't execute wsl conda from CMD (error: /bin/bash: conda: command not found), yet I can run wsl conda.exe without issue.

Do you have any ideas what I'm doing wrong or how I can remedy this?

Thank you kindly

python • 982 views
ADD COMMENT
1
Entering edit mode

I'm attempting to create a python GUI for analysing tRNA-Seq data that can run on Linux and Windows.

why would you want to do that ?

also : https://usegalaxy.org/

ADD REPLY
0
Entering edit mode

I would consider using a snakemake workflow as "backend" for your app, and wrap that with some python sugar, rather than those os.system calls. But writing a cross-platform GUI for this sounds unnecessary painful.

ADD REPLY

Login before adding your answer.

Traffic: 1303 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6