Questions tagged [python]
python is a programming language, widely used in bioinformatics
624
questions
3
votes
0
answers
49
views
Improving DNA Sequence Shuffling Code for Speed and Accuracy
I'm working on a Python script that shuffles DNA sequences while preserving their protein-coding potential. My goal is to adjust the codon usage in such a way that the ACGT (adenine, cytosine, guanine,...
0
votes
0
answers
18
views
Finding persistence length using OxDNA on python
on OxDNA's documentation, i found a code for determining persistence length. However, i have ran simulations for different number of bases on OxDNA and have the following text file as results: Columns ...
1
vote
0
answers
16
views
pysam ignoring some reads?
I want to modify TEtools to be able to use pysam so it can accept bam.
My version returns less read than the TE tools version.
Can someone explain to me why my code returns fewer reads? From my ...
0
votes
1
answer
18
views
What is the cross sectional area of DNA? Can we find persistence length using oxDNA?
i wish to determine the persistence length of double strand DNA with different bases (10 to 150). i found an equation: P= B_s/ K T where B_s is the bending stiffness and B_s= E * I where I is the ...
3
votes
3
answers
130
views
Introducing a fixed number of random substitutions in a sequence
I'm writing a function that introduces $n$ substitutions inside a sequence of nucleotides.
I have a working version, but I'm looking for any other ways of doing this:
...
1
vote
1
answer
45
views
Facing problem with BLASTx using BioPython in Google Colab
I'm trying to BLASTX a sequence using Biopython in Google Colab. Here is the code I am using. I'm not able to understand why I am getting an empty list [] for ...
1
vote
1
answer
42
views
opensource PyMOL compiling-install issue
Hi I am playing a little bit with schrodinger /
pymol-open-source
Trying to figure out how : python setup.py install works I found documentation in
pymol-open-...
0
votes
0
answers
80
views
How can I visualize protein secondary structure?
I'm currently working on a secondary structure prediction model and I'd like to visualize what will be predicted , the format of secondary structure sequence is consisted of 8 labels:
G: 3-turn helix ...
5
votes
1
answer
58
views
Waterman-Smith-Beyer implementation in Python
I am working on a text aligner to help me get a better understanding of specific steps necessary to perform sequence alignment. So far, things have been going great but I noticed yesterday that my ...
3
votes
0
answers
58
views
LigPlot (LigPlus) Giving Different Interactions on Command Line and GUI
I am trying to determine the interaction of the targeted amino acid with other amino acids, but I am having trouble. When I pass a PDB file of a protein that has ligands, I can see the interactions. ...
1
vote
1
answer
44
views
Is there a way to download all data containing amino acid sequence - secondary protein structure from protein data bank
Is there a way to download all data containing amino acid sequence - secondary protein structure from protein data bank(https://www.rcsb.org/).
Or is there a way to extract the data programaticaly ...
3
votes
1
answer
33
views
Fixation index calculation from the vcf files
I used the Python script FSTest (https://github.com/similab/FSTest) for the calculation of the fixation index from the extracted SNPs. I used the following command:
...
2
votes
2
answers
62
views
Python/R/bash script to ease the comparison of different protein complexes in PDB
I would like to create a table of comparison among similar protein complexes from the pdb.
This would be based on their numbers of proteins and the presence of each protein.
Is there any way like ...
3
votes
2
answers
75
views
Multi-pattern search in aligned sequences
I am currently working on a bioinformatics problem where I need to lookup and count the location and count of occurences of 4000-ish 5 character long patterns in each sequence of a fasta file of 700GB....
3
votes
2
answers
98
views
Running multiple sequence using spades.py on an HPC
I am trying to run a batch script to assemble sequences using the spades.py command on HPC. I tested the script with one sequence (1 forward and 1 reverse read) and this worked. I have 100 sequences ...
3
votes
2
answers
65
views
Biopython / ETE3 get subtree of a newick tree
I can not find a good example how to extract a subtree from a phylogenetic tree with either library.
I can load newick files etc, but not sure how to search for a ...
2
votes
0
answers
37
views
Using Python for Monte Carlo simulation for predicting protein nucleation aggregation
I want to write a code for a Monte Carlo simulation to determine the maximum stable complexes in a protein nucleation reaction. Also, need to graph the results for the same.
Here is the problem ...
3
votes
0
answers
21
views
Does PGS Catalog limit the number of queries to their FTP server?
I am calculating a polygenic risk score (PGS) from the PGS Catalog using the following command:
...
1
vote
0
answers
30
views
Trying to plot the results of GSEA in python
I'm having some major chaos with the output table generated and then passing that to my plot function. New to this (1st time), could somebody review this piece of code and suggest some corrections. I ...
1
vote
1
answer
134
views
How can I check if a PDB file is incomplete?
One of the requirements of simulating the protein chain is to check for missing atoms or residues. I.e., using software tools to identify (and, if necessary, model) any missing regions.
How can I ...
-1
votes
1
answer
51
views
How to design a synthetic wastewater FASTQ file that could be flagged as "engineered"?
I am an apprentice-level python user who occasionally works in medical laboratories and mainly does business work. I am presented with the unenviable task of orchestrating a proficiency test of some ...
1
vote
0
answers
28
views
How to shade text in a table
I have currently made a tool that takes input sequences and maps them to a reference sequence highlighting it. You can then save the word document and it creates a table of the sequence name and the ...
1
vote
0
answers
25
views
Biopython PhyloTree to PyVis Network
We are trying to convert a Phylogenetic tree to networkx previously calculated with
...
2
votes
1
answer
32
views
Single Node Deletion in Cheng and Church Algorithm
Cheng and Church Algorithm is a biclustering algorithm or an unsupervised learning task with which both rows and columns in a data matrix can be placed in concurrent clusters.
In the original paper, ...
3
votes
0
answers
22
views
Q8 Accuracy Evaluation metric mathematical expression used in Protein Secondary Structure Prediction
I am working on Protein Secondary Structure Prediction using Recurrent Neural Network (GRU) model. I came across few open source projects which already worked on the similar problem. All of them are ...
1
vote
0
answers
23
views
Calculating the segregating sites via tskit versus counting
Can you help me understand why I am getting different values when I calculate the segregating sites from tskit api versus manually counting? Thanks!
Example data generation:
...
0
votes
1
answer
73
views
Fetching Protein Sequences through UniPROT gives ConnectionError
I have 193000 protein interactions in CSV named all_proteininteractions.csv which have query protein name in the 2nd column and partner protein in the 3rd like this:...
0
votes
1
answer
74
views
conducting a ttest on a board of 1000 genes in 50 peope divided into to groups(A and B). pvalues are different each time
I am struggling in conducting at test on a board of 1000 genes in 50 individuals divided into to groups (A and B). I have a dataset of 1000 genes of two groups of people (total individuals=50)
group A ...
1
vote
0
answers
45
views
What versions of pip and python are appropriate for nsdpy?
I am currently trying to download all the requirements to make a COInr database, following this workflow; https://mkcoinr.readthedocs.io/en/latest/content/overview.html.
It requires a couple different ...
1
vote
4
answers
744
views
Remove sequences from a fasta file with IDs from a text file using Python
a python beginner here.
I have a fasta file with 2500+ sequences, and after doing some analysis I want to remove around 200+ sequences based on the matching IDs. Now, I have one fasta file (as sample....
3
votes
1
answer
172
views
How to perform liftover from 38 to 37 in R?
I have some gwas summary statistics in GRCh38 that I want to lift to GRCh37. I am trying to liftover in R using this code:
...
1
vote
0
answers
94
views
0
votes
0
answers
21
views
PyRanges: drop specific record from an object
Given a specific PyRanges object, such as
...
1
vote
0
answers
25
views
What are some good miRNA databases?
I am writing a project proposal for my boss and it is on codon usage bias in the dystrophin protein and the spectrin-like repeats found in a hmmscan file using the longest dystrophin isoform protein ...
-1
votes
1
answer
39
views
New to DNABERT confused about kmers input
I'm trying to use DNABERT to predict promoter regions. Right now, I have a df with 500k rows, 1st column is the DNA sequence (all different lengths), 2nd column says "promoter" vs. "non-...
3
votes
1
answer
62
views
retrieving past BLAST requests in bioPython
is there any way to retrieve a BLAST request made using the Biopython library using the request's query_id?
Alternatively is it possible to retrieve a query_id before the blast result is complete, and ...
1
vote
0
answers
70
views
Adding step size to cross validation in Python package lifelines
I'm using the Python package lifelines to build a CoxPH model where I reduce the step size to 0.1, like so:
...
2
votes
1
answer
56
views
BioPython SeqIO fails with Invalid Alphabet found
I am trying to store a GenBank file that could be read by Geneious later.
I found an example how to create the GenBank file here
But now I run into Alphabet issues.
...
1
vote
1
answer
96
views
bcbio run not running samples in parallel
Sorry for the cross post but I'm not getting a response on bcbio github:
I'm trying to run bcbio on 20 samples and it's only running one at a time as it steps through the yaml seemingly. I'm using ...
0
votes
0
answers
122
views
Error in snakemake when running conda envs in container
I am facing an issue when running snakemake with a container and conda.
Let me explain better.
I am developing a workflow (locally) in snakemake, where some rules use a conda env (defined in /envs/env....
2
votes
1
answer
659
views
GWAS in python?
A question similar to this has also been asked on Biostars
I understand GWAS is done with R, but are any written in Python?
I'm used to python and java, acclimating to R will take a bit of time and my ...
1
vote
0
answers
61
views
SNP How to detect regions of erratic pairwise alignment?
I have clusters of DNA sequences that contain some mutations. All the sequences in a cluster should contain the same mutations.
As the mutations aren't known, those clusters of sequences were pairwise-...
1
vote
2
answers
804
views
ValueError: count not convert string to float
I'm trying to use a Python script to plot with a rolling window using pandas and seaborn. This code worked for the longest time but now it's giving me an error that I don't know how to fix.
Here is ...
3
votes
2
answers
46
views
Compare files with similar names using placeholders/wildcards in Snakemake
In Snakemake I want to use two input files for comparison. The one file has a sample name (e.g. 526846), with an experimental id (e.g. EF_S13' and 'MF_S5'). The file I want to compare it to has the ...
3
votes
1
answer
188
views
Generating CIGAR strings for MSA with reference
I have a list containing the results of a MSA:
...
1
vote
1
answer
106
views
For loop in Python goes wrong
I have mutation status (0,1) for ten genes in ten cancer 3D models
I have also gene expression in these 3D models, like
...
1
vote
1
answer
342
views
How to pack up a Python script in the form a Dockerfile
I have a simple Python script with this header
...
0
votes
1
answer
271
views
Looping over a list of cell models in Python
I have two data sets
Mutations in 10 genes
Gene expression in 18 cancer 3D models
For every (mutation, gene) and gene expression pair we run an ANOVA test
This is my data
...
3
votes
1
answer
332
views
How can I develop a snakemake rule for all files in multiple directories?
I am a beginner in snakemake and I'm trying to develop a working flow.
Imagine I have multiple folders and in each folder I have a tumour and normal sample files:
...
3
votes
1
answer
37
views
How to access yeast-cyc in a programmatic way to extract the GO terms?
I am a newbie in Bioinformatics, I want to extract the GO terms from yeast-cyc,
which is items in the Go terms tab of this page https://yeast.biocyc.org/gene?orgid=YEAST&id=G3O-29622#tab=GO , not ...