Questions tagged [biopython]

Biopython is a set of freely available tools for biological computation written in Python.

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

Pipeline for paired end RNA sequence data to proteins

Forgive the basic question here, but I'm super novice at this ... I have a series of paired-end RNA fastq files (e.g. SRR10720226_1.fastq.gz and ...
user avatar
  • 101
2 votes
1 answer
54 views

Biopython reads my tree eternally long

I have a nexus tree (1332 taxa) with a lot of additional data. When I tried to read it through tree = Phylo.read(treepath, "nexus"), my kernel got ...
user avatar
  • 305
0 votes
1 answer
16 views

different results of RMSD for the same trajectory file

I want to analyze the RMSD of my trajectory files using MdTraj. I used two different codes for this purpose: the first code: ...
user avatar
  • 1
2 votes
1 answer
57 views

How to create drug synergy plot?

I want to replicate the synergy drug response curve with the Python library given in the following paper. Could you kindly advice on: Suitable graphics libraries for Python Code or pseudo code ...
user avatar
  • 99
4 votes
2 answers
47 views

Help using BioPython's IC_Chain functionality for getting protein 3D coordinates from torsion angles

I have been successfully using BioPython's functionality for extracting protein torsion angles using the IC_Chain module. However, I am currently looking to use the ...
user avatar
  • 385
3 votes
1 answer
60 views

Missing ',' in line when Biopython reads a nexus tree

I want to edit a tree that I got from BEAST2 treeannotator in nexus-format. Usually I use the module Phylo from Biopython for such work but ...
user avatar
  • 305
5 votes
1 answer
40 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 ...
user avatar
  • 385
5 votes
1 answer
66 views

Identify side chain atoms in BioPandas dataframe

I am currently implementing some metrics I could use for comparing two conformations of the same protein in Python. For example, I know I could use the RMSD of all protein ATOMS in BioPandas using ...
user avatar
  • 385
4 votes
1 answer
66 views

Programmatic way of accessing the FASTA sequence similarity tool (or similar) in Python

I am looking for a tool that performs a sequence similarity algorithm for proteins. More specifically, I am looking for something that would be usable in Python (or anything else usable in the command ...
user avatar
  • 385
1 vote
2 answers
76 views

Bio.codonalign.codonseq module (cal_dn_ds) for SARS-COV-2

I have calculated the dN,dS ratio for a SARS-COV-2 data set ('NC_045512.2' (Wuhan strain) and 'LC666924.1'), and results in a zero value (for most of the genes). Is it possible and what is the ...
user avatar
  • 11
5 votes
1 answer
148 views

Is there any function in Biopython to convert a DNA sequence from ambiguous to unambiguous?

I have a project to write in Python that requires to write a function that given degenerate DNA sequence (for example: KKGTACACCAG) sequence and a molecular weight interval, returns a list of all ...
user avatar
1 vote
1 answer
104 views

makeblastdb creating multiple files of unexpectedly large sizes

I have a set of 100 amino acid sequences and I want to perform a BLASTP sesrch against the refseq_protein database. Accordingly I had set up the standalone version ...
user avatar
3 votes
1 answer
121 views

Updating the GFF3 + Fasta to GeneBank code

I'm trying to convert gff3 and fasta into a gbk file for usage in Mauve. I've found a solution but the code is outdated: ...
user avatar
  • 121
0 votes
1 answer
38 views

How to extract part of protein complex separated with HEADER with two molecules from one PDB file

I have a PDB file which contain two molecules (receptor and ligand). Each molecule will have its own header. All in ONE PDB file. ‌The header of receptor section looks like this (line 1-6 of the PDB ...
user avatar
  • 155
1 vote
1 answer
71 views

How do you replace multiple sequence names with new names using python?

I have into a dictionary some sequences. I would like to replace the sequences name for new names contained into a dataframe. ...
user avatar
1 vote
0 answers
18 views

Converting miRNA names to miRBase version IDs

I have a list of miRNAs IDs (2000-2500) that I want to find miRBase IDs for them. For example: hsa-miR-106a ---> hsa-miR-106a-5p hsa-miR-373* --> hsa-miR-373-5p hsa-miR-33 --> hsa-miR-33a-5p ...
user avatar
  • 11
1 vote
0 answers
19 views

Download COX1 (COI) gene via biopython using accessions for entire mitochondrial genomes

I have a list of accessions for the the entire mitochondrial genomes for big cats. I need to download the COX1 genes for each of these accessions. Here is one accession and here is a link to its COX1 ...
user avatar
0 votes
2 answers
48 views

Use biopython to align SeqRecords stored in dict

I'd like to perform multiple alignments, where a gene from each sample was read in from fasta files. The fasta file represented one sample and had multiple genes. I have read in each sample fasta file ...
user avatar
0 votes
1 answer
146 views

How to extract the protein sequences of a genbank file using R or biopython

sorry for the question, I'm trying to extract the proteins sequences from a genbank file. ...
user avatar
  • 115
4 votes
1 answer
65 views

Counting hexamers in fasta sequence and identify its structure (and interruptions)

I have a lot of fasta files, each one with thousand of reads containing the hexameric motif "CCCTCT". The hexameric motif is highly continuous in most cases but interruptions may occur. I ...
user avatar
  • 41
1 vote
2 answers
145 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: ...
user avatar
0 votes
1 answer
84 views

How can I identify acceptor and donor atoms using BioPython?

I know how to traverse through structures, models, residues, and atoms in a protein chain using BioPython (which is very easy). How can I identify donor and acceptor atoms in a chain?
user avatar
0 votes
1 answer
221 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?
user avatar
0 votes
1 answer
61 views

How can I get a list of neighboring Hydrogen atoms of an alpha-carbon?

Suppose, I want to find the neighboring Hydrogen atoms of a specific C-alpha atom. The following was my effort. However, it produces a bunch of empty lists. ...
user avatar
0 votes
1 answer
19 views

How can I calculate the distance w.r.t. a beta sheet?

Suppose, I have a protein (say, 16PK). and, I want to calculate the distance between one of its alpha-carbons and the nearest beta-sheet. the distance between two strands in a beta-sheet (i, j). How ...
user avatar
0 votes
0 answers
17 views

Why does it require four vectors to calculate a torsion angle? [duplicate]

The BioPython documentation shows the following: 11.6.3 Measuring torsion angles Use the vector representation of the atomic coordinates and the calc dihedral function from the Vector module: ...
user avatar
3 votes
2 answers
103 views

Why does it require 4 vectors to calculate a torsion angle?

The BioPython documentation shows the following: 11.6.3 Measuring torsion angles Use the vector representation of the atomic coordinates, and the calc dihedral function from the Vector module: ...
user avatar
1 vote
0 answers
29 views

AttributeError: 'FeatureDB' object has no attribute 'strand'

It appers when a gene has a negative strand then I need to reverse the sequence. Unfortunately, I got the following error: ...
user avatar
0 votes
1 answer
43 views

creating a dictonary in Python

From the FASTA header I get the following information: ...
user avatar
0 votes
1 answer
67 views

How to Read SCF file in Python?

Is there any way that I can read SCF file in python like in R using sangerseqR, I have tried with Biopython, it seems it does not support this format.
user avatar
  • 151
2 votes
1 answer
64 views

ensembldb equivalent in python

Is there a python equivalent to ensembldb? I want to get genome coordinates for a transcript (like the function transcriptToGenome) but need to do it in python. I ...
user avatar
  • 21
1 vote
0 answers
47 views

3d model of a protein via nucleotide sequence

I really appreciate @Matteo Ferla's detailed answer to my previous question. I've already tested several tools to know if a mutation can cause a modification in the function of protein or not. There ...
user avatar
  • 81
3 votes
2 answers
109 views

How to make 3d model of a protein that not exist in PDB?

I'm working on nsSNPs(Non-synonymous single nucleotide polymorphisms) of protein AKAP13 whose PDB not available. I did one mutation in this protein and I want to show the effect by 3d modeling without ...
user avatar
  • 81
1 vote
1 answer
101 views

Entrez (Biopython) esearch and efetch not returning sequence as expected

I'm trying to use Entrez (through Biopython) to download the sequence of a TMV replicase gene. I have the following code: ...
user avatar
0 votes
1 answer
32 views

How to index residues by icode in biopython?

I am indexing a structure by the code below: ...
user avatar
1 vote
1 answer
76 views

10bp sliding window quality score

I am having trouble creating a 10 basepair sliding window that goes through seq and trim them all 10 basepairs that have an average quality score (...
user avatar
0 votes
1 answer
332 views

Using Entrez.efetch() to retrive .fasta file from any NCBI database?

I tried to use these python codes to retrieve a .fasta file from gene database, but the output were the parameters of the report ...
user avatar
1 vote
0 answers
22 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 ...
user avatar
  • 26
1 vote
1 answer
59 views

Biopython BioSQL error : AttributeError: 'DBSeq' object has no attribute '_data'

Hi I am playing with Biopython and BioSQL, I manage to create an MySQL database using Managing local biological databases with the BioSQL module tutorial: and load 2909 fasta sequences in it through: <...
user avatar
  • 274
1 vote
2 answers
223 views

Remove Redundant Sequences from FASTA file with Biopython reducing memory footprint

I need help with my Biopython code, I am kind of new to Python and Biopython so please don't be harsh on me. Everything started from here: Remove duplicated sequences in FASTA with Python I answered ...
user avatar
  • 274
5 votes
1 answer
127 views

KeyError when getting features from a genbank file with biopython with some accessions but not others

I'm very new to python but i've been using it to extract the sequence of a gene from a genbank file. The issue is is that sometimes i'll get the output i want (prints the sequence to a file) and ...
user avatar
  • 53
1 vote
2 answers
118 views

biopython-motifs , How can I create motif from sequences of different length?

I want to create motif of different length kmers. Following code works for kmers of same length but not different length.What to do ? ...
user avatar
  • 21
0 votes
1 answer
64 views

BioPython - Retrieve sequence records from pubmed database

I've been assigned a task to fetch sequence records from "pubmed" database: fetch 30 record of type "fasta" from (pubmed database, with term hemoglobin AND alpha) as a sequence ...
user avatar
  • 1
2 votes
0 answers
85 views

How to extract clusters from a phylogenetic tree?

I am using Biopython Phylo and RDkit Cluster to obtain a UPGMA tree from a distance matrix of 5k x 5k entries. How can I extract clustered entry names given a number of clusters? For example, Bio....
user avatar
-1 votes
1 answer
195 views

Biopython SeqIO check input file

Hi I am trying to learnt python3 and Biopython, I am trying to check imported fasta file before processing so far using: ...
user avatar
  • 274
-4 votes
1 answer
81 views

Creating a tab delimited column [closed]

I have a blast file produced. I executed a blast(x) command outputting both "qeseqid" and ...
user avatar
1 vote
1 answer
14 views

What is the best way to drop alignment artifacts in sequence objects in biopython?

I have a bunch of sequences created with Roary which I want to preprocess. When I read the sequences (genomics data) I want to translate them to protein sequences ...
user avatar
  • 1,181
1 vote
0 answers
21 views

Detecting Allelic Imbalance

I am interested in detecting allelic imbalance for a credible set of SNPs. Currently, I am looking for some packages, hopefully, for Python, that can assist with this. I am aware of this R package, ...
user avatar
1 vote
6 answers
228 views

How to remove duplicates from a fasta file using python

I am using the following command: ...
user avatar
0 votes
2 answers
46 views

How to obtain desired output?

I am working on a project using the following command within nano: ...
user avatar