Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
0
votes
1answer
5 views

Python: How to write duplicate sequences removed from fasta file to new file

I currently am using this code to remove duplicate sequences from the fasta file. However, I would also like to write a new file with only the removed duplicates as well as a count for how many times ...
0
votes
1answer
51 views

Remove Redundant Sequences from FASTA file in Python

I'm attempting to remove redundant sequences from a fasta file (from NCBI). When I execute this code, it returns the number of spots, not the number of sequences. (Number of spots: 408,293, Number of ...
1
vote
1answer
32 views

Multiple input & output files?

I'm trying to print out the measured distances for each .pdbqt file, and then write a new output file for each .pdbqt, using the original name of the .pdbqt file as the new .txt file name. Below is ...
1
vote
1answer
38 views

Modify how a script prints the output?

I'm trying to print out all measured distances between a ligand and 2 residues (using PyMol), below is the script that I'm using. I only want to measure the distances between all the ligand's O & ...
1
vote
4answers
52 views

How to make work programs from the $PATH?

I am trying to analyze my RNAseq reads for defective genomes and I use this program (http://www.di-tector.cyame.eu/) that is suggested by Beauclair et al (https://pubmed.ncbi.nlm.nih.gov/30012569/) ...
1
vote
1answer
22 views

How to use the DI-tector software for defective genomes analysis?

I am trying to use a free .py script from this site http://www.di-tector.cyame.eu/ while unfortunately there's neither manual nor any documentation presented. ...
0
votes
0answers
43 views

Changing alpha-numeric IDs to numeric only IDs

I need to convert my three text files to the exact formatting of the corresponding example files in order to run my code. I think the formatting error being generated is from the geneID (bold) ...
-1
votes
1answer
58 views

What is the full script to extract sequences from fasta file by using Ids in text file in python 3 and pycharm?

I have a fasta file (gene.fasta)with sequences with names patterns: ...
0
votes
0answers
9 views

Could not parse String db protein interaction network PSI-MI XML file with GenerateDS Python parser

I want to get a list of all evidence types for interactions String db finds based on a list of gene names in order to filter in only those pieces of evidence I have confidence in. I downloaded a ...
0
votes
0answers
25 views

Error in ROSETTA flex ddG tutorial

I'm trying out the ROSETTA flex ddg tutorial (https://github.com/Kortemme-Lab/flex_ddG_tutorial). When running "Example 1" I get an output but with apparently empty folder. When running the "Analysis"...
1
vote
1answer
34 views

Outputting crunchable list of HBonds from Pymol

X-posted from the Main Stack Overflow because folks here are possibly more familiar with PyMol(?) I have been trying to assess the strength of an interface I want to mutate using Pymol. What I am ...
1
vote
1answer
57 views

Importing a WGCNA co-expression network into a networkX graph in Python

Is there a way to generate a WGCNA co-expression graph in R, and then to import that graph into Python such that I can represent it using a networkX object?
0
votes
2answers
36 views

Tools for creating gene coexpression networks

What are some good tools (in Python if possible) for creating gene co-expression networks from RNA seq data?
1
vote
1answer
53 views

Using bioconductor from Python

Has anyone used bioconductor from Python? Is there any reason I would choose to use it from R instead of Python? It seems like there is a Python extension for it. Also, is there any reason to use ...
0
votes
1answer
33 views

How to convert BAM file to bigWig in Python?

I am manipulating some BAM files using pysam package which seems to be very fast and handy. However, I ran into problem when I am trying to generate bigWig files ...
2
votes
0answers
23 views

MSA (protein) with biopython or something else?

I am very new to bioinformatics (and python in general), but I would like to use python to more efficiently analyse enzymes both in terms of structure and functio, using Jupiter notebook. I would like ...
0
votes
0answers
22 views

Finding regions between ORFs

I'm doing work on mRNA and need to get predicted mRNA sequences from a genome. I'm working with this genome https://www.ncbi.nlm.nih.gov/nuccore/U00096.3 (E. coli k-12 mg1655). So have a genome ...
1
vote
1answer
29 views

Model the effect of treatment on mutation burden

I am struggling a bit to model the following problem. Basically, I would like to model tumor mutation burden (mutations per megabase, a continuous) as a function of treatment (categorical). The ...
1
vote
2answers
51 views

how to use list of gene id to get cds sequence(cds fasta file have many annotation, only gene id: is same to query id)

i have a question when i want to extract cds sequence using gene id. but cds file is not just start with >gene is, it has many other annotation. the only same is star with gene: cds fasta: ...
0
votes
2answers
57 views

A .gtf file for HG38 for HISAT2 indexing

I am trying to build a HISAT2 index using Pertea et al. procedure (https://www.ncbi.nlm.nih.gov/pubmed/27560171) using their extract_splice_sites.py and ...
0
votes
1answer
20 views

Programmatically retrieve graph features from Cytoscape

Is there a way to programmatically retrieve graph features (a networkx graph) from Cytoscape in Python 3? EDIT: To add more details, I had a dictionary of proteins, each protein was associated with ...
1
vote
1answer
50 views

Significance of k-mer length in COVID-19 sequence analysis?

I'm getting started in biology and bioinformatics with sequencing the SARS-Cov-2 or Coronavirus genome. I'm interested in this code which identifies k-mers in the genome: ...
1
vote
1answer
89 views

Downloading SRA Files from AWS

I want to download the original BAM files that the authors had uploaded to SRA. Normally, I would just use sam-dump, but the files are having issues that seem ...
1
vote
3answers
105 views

Output when compute GC content is different between using user input and using string

I am learning bioinformatics and i was solving a problem on rosalind.info. Input is a string consist of multiple DNA strand names and the DNA sequences, and Output is the name of the sequence that has ...
1
vote
1answer
36 views

Finding discriminating positions for a sequence alignment column

I don't have any theoretical background in biology, so forgive me if my question is a bit.. well..dumb. I'm trying to use a Monte Carlo approach to find the discriminating position of a given sequence ...
1
vote
1answer
39 views

Loading all PPI information from Uniprot into a graph in NetworkX

I am looking for guidance to load all SwissProt PPI data for Homo sapiens into a graph (from NetworkX). In particular, the part that I'm struggling with is gathering the data from SwissProt for each ...
0
votes
1answer
58 views

how do i change a variable with iterator under a for loop in python

This question comes up in my bioinfo class. I have a csv file containing gene names and the cluster they belong to. I want to run GESA on each individual cluster. So I would like to extract the list ...
0
votes
1answer
35 views

Use a specific python.exe instance with PyMOL/Windows?

I want to use RDKit with a python script in PyMOL. RDKit requires a conda environment, so I think I need to be able to specify that the instance of python that I want to use would be in that ...
1
vote
1answer
41 views

Extract autodocked protein-ligand connections programatically

I have 2 crystal structures, one for my protein and one for my ligand (I have several protein-ligand pairs). I am using AutoDock Vina to simulate docking, which returns another file of the ligand with ...
0
votes
1answer
34 views

run a tool with python>=3.6 on galaxy-project instance that runs on python2.7

I am developing a wrapper for a bioinformatics tool writen in python3. The native Galaxy-project runs on python2.7. How can I the tool that requires python3 in a galaxy-project instance?
-2
votes
1answer
51 views

Running a script in python [closed]

I am trying to run a script in python but I getting this error ...
1
vote
0answers
16 views

Indel quality from mpileup

Could someone please confirm that I understand this correctly? I have the res and qual columns from mpileup and I would like to match them to get the qual per base. It seems that the indel initiation (...
1
vote
1answer
41 views

Visualizing cell growth

I model the following events: a rod-shaped cell with center $x$ grows symmetrically until it reaches a maximum length/age, it divides into two identical cells, and the process continues. At division, ...
2
votes
1answer
23 views

Tools for modelling and visualizing growth of cells

I am looking for a program/GUI app/package that would help me do simulations for cell growth. I have a microscopic mathematical model, and the scenario is basically the following: I start with a rod-...
1
vote
1answer
26 views

Cutting the sequence into several sequences with the information of a dataframe

I have a fasta file with several 120-concatenation protein sequences. I also have a data frame with 120 names of proteins in column 1 and their length in column 2. Using this dataframe I want to ...
-1
votes
2answers
38 views

Installing a package on Mac

I am trying to instll sigproextractor package on my Mac I tried ...
0
votes
1answer
36 views

how to generate structure file from blast results of an input sequence

I have tried to incorporate blast in my application using biopython.i could extract the blast results but now i want to extract the structure file corresponding matches. My code is : ...
2
votes
1answer
54 views

Why does samtools mpileup sometimes include ref bases (other than ',' or '.')?

This is my first post here. I can think of no way of giving an easily reproducible example, as per the stack ethos. SO apologies in advance and any feedback on question format appreciated. I have ...
1
vote
2answers
41 views

Trying to divide number in fourth TSV column by a certain number according to its corresponding identifier in the first column

I was wondering if anyone could help with my little issue in manipulating tsv files in order to calculate estimated coverage across many tsv files. I have tsv files that look something like this: <...
-1
votes
1answer
115 views

How to generate ultrametric phylogenetic trees?

I have generated rooted species tree with 1000 bootstraps by RAxML. Further, I need to generate ultrametric tree for the same. Therefore, Please suggest me how to generate ultrametric tree from the ...
2
votes
0answers
68 views

How to get the GO information for all the human genes?

I would like to retrieve a list of all the human genes and their proteins’ functional classification. The Gene type attribute on ensembl.org is not specific ...
1
vote
1answer
73 views

Finding common and unique data set by comparing two files based on their column and to split the columns multiple strings to print in output

I have very large sizes tab-delimited .vcf files and want to match these two / or 3 files based on their position and print to a new .csv file File structures: File_1: tab-delimited file (.vcf) ...
1
vote
2answers
42 views

No output when trying to obtain protein sequence from PDB file

I am trying to obtain the sequence from PDB file, but no output is given when I run the following code : ...
3
votes
2answers
184 views

How to translate amino acid sequences to Nucleotide sequences

I want to convert a list of fasta ( protein sequences) in a .text file into corresponding nucleotide sequences. A Google search gives me result of DNA to protein conversion but not vice versa. Also, I ...
0
votes
0answers
15 views

Chaos game representation to calculate 3 and 4mer result in a blank plot

I need to plot the 3-mer and 4-mer using the Chaos game representation for which I have referred the tutorial available at https://towardsdatascience.com/chaos-game-representation-of-a-genetic-...
1
vote
1answer
50 views

Writing a python module to run Infernal on a list of fasta files

I am very new to using python3 and am hoping to use it to reduce the time I need to spend running Infernal to look for a variety of RNAs in a large collection of bacterial genomes. I am hoping to ...
2
votes
2answers
113 views

Why does this naive Python paired Fastq reader work?

I wrote some throwaway code for ingesting paired-end reads from a Fastq file into memory. ...
1
vote
2answers
43 views

How to exclude the repetition of gene-gene correlation calculation in python?

I am trying to make a paired matrix of gene-gene correlation. Considering that I have a huge matrix (13000 genes and 900 samples) and for some reasons I don't want to decrease the number of my genes, ...
0
votes
1answer
76 views

How to represent pathways as mathematical graphs?

I would like to construct a mathematical graph: $G = (E,V, w(E))$ a graph with vertices, edges with weight on them based on a KEGG pathway. Is there a way to do that with existing tools? If not I ...
0
votes
1answer
37 views

Processed spliced and unspliced count matrices for existing scRNA-seq atlases

Before I do this myself... Is there any compiled batch-corrected dataset of the major scRNA-seq atlases (Mouse Cell Atlas, Mouse Organogenesis Atlas, Mouse Gastrulation Atlas, Tabula Muris, Tabula ...

1
2 3 4 5