Skip to main content

Questions tagged [python]

python is a programming language, widely used in bioinformatics

Filter by
Sorted by
Tagged with
2 votes
1 answer
25 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 ...
0 votes
2 answers
90 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 ...
3 votes
2 answers
876 views

PDB file downloading: pymol automation vs. manual

I automated a PDB download using a Pymol script (below) ...
3 votes
2 answers
40 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
1 answer
417 views

Reading a Fast5-file with Python

I am trying to extract data from fast5-file with python 3.9.13 in Ubuntu. I have found a library "fast5_research"(This package comprises an API to HDF containers used by the research groups ...
2 votes
0 answers
24 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 ...
2 votes
1 answer
76 views

Is there a way to extract spike sequence from a Sars-CoV-2 complete genome (preferably in Python)?

I have a complete genome sequence of a Sars-CoV-2 variant, but I am only interested in the Spike sequence? I should note that I am not a biologist (nor bioinformatics). The complete genome looks like ...
2 votes
1 answer
230 views

finding motifs in fasta file with multiple sequences

I am able to find matching motifs on a single sequence, as well as their position as shown below : ...
3 votes
0 answers
16 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: ...
2 votes
1 answer
96 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: ...
3 votes
1 answer
940 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
1 answer
198 views

How can I match sequences with IDs using python dictionaries?

...
1 vote
0 answers
21 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 ...
2 votes
1 answer
140 views

working with cutadapt

I'm working with ion torrent data where I apply the program cutadapt. I'm analyzing ITS seq data, as well as Matk. When I'm using cutadapt, I search the information for this genes, and built new ...
1 vote
1 answer
67 views

AttributeError [in fastStructure's chooseK.py]: module 'vars' has no attribute 'insum'

I've been working with the fastStructure program and am on the step of analyzing model complexity using the provided chooseK.py script. I have been running into the following error: ...
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 ...
1 vote
1 answer
44 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 vote
1 answer
438 views

Is there a way to use BioLemmatizer from Python?

Lemmatization is one of the most important tasks for text normalization in natural language processing (NLP), i.e. using deep learning to understand text data. One of the good lemmatizers I found for ...
2 votes
1 answer
31 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
1 answer
55 views

How are BLAST record scores calculated in biopython

Can someone explain how the score is calculated for Bio.Blast.Record.Description? For example, if Record.Description.num_alignments is >1, is ...
-1 votes
1 answer
38 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
2 answers
93 views

Advise on building an effect ML model for predicting important proteins for drug response

I want to create a model to predict proteins which could be associated with drug response in cancer cell lines. I have cell line proteomics data, with compound screening data they have gained for a ...
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 ...
3 votes
1 answer
82 views

How to extract and visualize sequence logos from CNN kernels?

I created a basic CNN architecture using Tensorflow to classify transcription factor binding sites. My aim is to somehow extract and visualize sequence logos from the convolutional kernels. The model ...
1 vote
1 answer
46 views

querying gdc metadata issues with resulting fields

I have been trying to access metadata from the Genomic Data Commons; however, not all of the information I want is showing up in the resulting tsv file. How do I get sample type and analyte type to ...
1 vote
0 answers
22 views

Biopython PhyloTree to PyVis Network

We are trying to convert a Phylogenetic tree to networkx previously calculated with ...
3 votes
2 answers
49 views

Finding annotated counterpart after BLASTn with efetch (Biopython)

I am creating a pipeline for the identification of unknown transcripts. After a local BLASTn search of the transcripts, I have a large list of the respective hits with different genomes. I have the ...
1 vote
1 answer
745 views

tensorflow nn_model for DNA sequences: Matrix size-incompatible: In[0]: [2,1], In[1]: [784,300]

Hope anyone can help a beginner here. I'm building a proof-of concept tensorflow classifier for DNA sequences. However, the NN model does not let through train and test vectors saying the matrix size ...
0 votes
1 answer
71 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 ...
0 votes
1 answer
45 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:...
10 votes
2 answers
2k views

How do you generate read-length vs read-quality plot for long-read sequencing data (e.g., MinION)?

How do you generate read-length vs read-quality plot (heat map with histograms in the margin) for long-read sequencing data from the Oxford Nanopore Technologies (ONT) MinION? The MinKNOW software ...
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
18 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: ...
2 votes
2 answers
2k views

How can I programmatically add Hydrogen to a PDB structure using BioPython?

I need to programmatically add Hydrogen atoms to a PDB file (say, 16PK.pdb) using BioPython. What algorithm should I use for this?
1 vote
4 answers
491 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....
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 ...
6 votes
2 answers
248 views

BioPython internal_coords module returns different dihedral angles for the (seemingly) same protein structure

I am using the internal_coords module from BioPython in order to compare dihedral angles of two different conformations of the same protein. The conformations are ...
2 votes
1 answer
45 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
69 views

Need help with binding DB API

...
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
34 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-...
1 vote
0 answers
45 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
2 answers
267 views

motif searching in a multi-fasta file

I am having trouble trying to search for motifs in a multi fasta file. I have used two techniques one gives me the name of the sequence where the motif is found but doesn't give me the the motif and ...
2 votes
3 answers
767 views

Retrieve ID ligand from PDB file

I have thousands of PDB files and I need to extract the following information from each of them: an ID or the name of the small molecule (ligand) present in the complex. Is there a way to do that ...
2 votes
1 answer
43 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. ...
0 votes
0 answers
90 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....
3 votes
1 answer
607 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
3 answers
581 views

How can I programmatically add a Hydrogen 'Atom' to a 'Residue' object?

I know the algorithm for creating a Hydrogen atom and adding to a residue: ...
1 vote
0 answers
59 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
2 3 4 5
13