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
1answer
44 views

Blastp MSA to the same length

To generate aligned protein sequence truncate to the same length, I use blastp in biopython for MSA. I have multiple queries and one subject sequence. However, the alignment never returns the same ...
2
votes
0answers
68 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 an ambiguous DNA (for example: KKGTACACCAG) sequence and a molecular weight interval, returns a list of all unambiguous ...
0
votes
1answer
61 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 ...
1
vote
1answer
51 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 ...
0
votes
1answer
218 views

Why SeqIO.parse method isn't working?

I am trying to follow the tutorial from from the Biopython website here and I am right at the beginning (2.4.1), where I am trying a Simple FASTA parsing example which is ...
0
votes
1answer
40 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. ...
0
votes
2answers
119 views

What kind of analysis is practically done on GSE data files?

I have a GSE data file in csv file format containing fields such as: ID, adj.P.Val, P.Value, t, B, logFC, Gene.symbol, Gene.title. In which adj.P.Val, P.Value, t, B, logFC fields being numeric. What ...
2
votes
1answer
425 views

Biopython - extracting query coverage from XML Blast output

I need to extract (or to calculate precisely) the query coverage from Blast output. I am using NCBIWWW.qblast to query Blast in XML format. Is it possible to know the query coverage parsing the XML ...
3
votes
1answer
47 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 ...
2
votes
0answers
65 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....
3
votes
1answer
60 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: ...
0
votes
1answer
27 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 ...
1
vote
1answer
63 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. ...
0
votes
0answers
13 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 ...
1
vote
0answers
16 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 ...
0
votes
2answers
39 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 ...
0
votes
1answer
110 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. ...
1
vote
2answers
181 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 ...
1
vote
2answers
112 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: ...
0
votes
1answer
73 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?
3
votes
2answers
147 views

Download proteomes from NCBI based only on binomial names

I'm trying to download around 2000 proteomes from NCBI, but all I have is the genus and species e.g: lophodermium_seditiosum trichoderma_harzianum Does anyone know ...
1
vote
5answers
180 views
0
votes
1answer
65 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?
0
votes
1answer
16 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 ...
0
votes
0answers
16 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: ...
3
votes
2answers
62 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: ...
1
vote
0answers
27 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: ...
0
votes
1answer
41 views

creating a dictonary in Python

From the FASTA header I get the following information: ...
3
votes
1answer
483 views

How can I apply proportional (p) distances (Nucleotide) using bioPython

I am working on phylogenetic tree generation. I used BioPython and ClustalW 2.x.x for this purpose. I have generate the tree using BioPython but when I try to generate tree using "MegaSoftware GUI" ...
-1
votes
1answer
94 views

Given a .gb file and a locus - how to get relevant annotations in Python?

Given a .gb file and a specific locus in the genome - how can I retrieve the relevant annotations in Python (i.e., annotations that include that locus)? I could ...
0
votes
1answer
47 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.
2
votes
1answer
48 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 ...
3
votes
2answers
98 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 ...
1
vote
0answers
46 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 ...
1
vote
1answer
58 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: ...
0
votes
1answer
24 views
5
votes
0answers
111 views

Using dssp after chain extraction

I have a list of PDB IDs with realtive chains that are to be extracted, and the run on dssp. For the single chain extraction I tried several methods, such as: ...
3
votes
1answer
163 views

Glocal\semi-local\Hybride Globale-Local alignment with Python

I was looking for a simple way to do a glocal alignment. The case I have is I have a small sequence which should be find in a bigger one, thus typically a glocal alignment. Also I can not Install ...
1
vote
1answer
58 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 (...
3
votes
1answer
72 views

How to load output from the kegg API in biopython into a pandas dataframe?

Biopython provides a (bit unintuitive) API to access to the Kyoto Encyclopedia of Genes and Genomes (KEGG). I am trying to make use of it, but the output is quite unhandy as a string. What is the best ...
0
votes
1answer
171 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 ...
1
vote
4answers
2k views

Extract residue sequence from pdb file (in biopython, but open to recommendations)

I'm new to Biopython and I'd like to extract the sequence of residues from a pdb file. My two questions are: What is the simplest way to do this? (Esp. when there is more than one sequence) and ...
1
vote
0answers
21 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 ...
0
votes
3answers
374 views

Finding motifs: fasta file with 10,000 sequences

I am new to Python. I am trying to parse a fasta file containing 10,000 sequences to look for motifs (microsatellites in particular). I tried using Seq Utils to parse my sequences for a particular ...
1
vote
1answer
54 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: <...
4
votes
1answer
71 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 ...
2
votes
1answer
200 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
3answers
103 views
1
vote
2answers
87 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 ? ...