Questions tagged [python]
python is a programming language, widely used in bioinformatics
39
questions
9
votes
3
answers
4k
views
Running Snakemake in one single conda env
I have been experimenting a lot lately with Snakemake, I love it. Recently I also switched to using conda (--use-conda) in the way that is advertised. However, I have some issues with it, mostly ...
5
votes
2
answers
315
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:
...
3
votes
2
answers
352
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
2
answers
455
views
How to sort multiple FASTA files based on their content?
I have around 10,000 FASTA files of Influenza A virus.
These files contains sequences of each of the 8 segments of the viral genome and I want to separate each genome segment into a different folder ...
1
vote
1
answer
162
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 ...
1
vote
2
answers
55
views
Improving list speed: glycosylation example
I discussed a question with @gaspanic Python/Biopython - Replace amino acid residue on MSA with "z" from a list of unaligned positions
. The issue emerged was speeding up lists in Python. ...
0
votes
1
answer
1k
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
...
11
votes
1
answer
3k
views
Changing the record id in a FASTA file using BioPython
I have the following FASTA file, original.fasta:
>foo
GCTCACACATAGTTGATGCAGATGTTGAATTCACTATGAGGTGGGAGGATGTAGGGCCA
I need ...
11
votes
3
answers
7k
views
Converting a VCF into a FASTA given a reference with Python, R
I am interested in converting a VCF file into a FASTA file given a reference sequence with Python or R.
Samtools/BCFtools (Heng Li) provides a Perl script ...
9
votes
1
answer
392
views
How to get the count of each kmer past 255 using khmer
I have a Fastq file and I want to get the exact count of each possible kmer from this file.
On a previous post called How to use khmer to count k-mers? Daniel Standage proposed a custom script based ...
9
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 ...
8
votes
1
answer
460
views
Getting protein FASTA sequence based on keyword with python
I would like to gather proteins FASTA sequence from Entrez with python 2.7. I am looking for any proteins that have the keywords: "terminase" and "large" in their name. So far I got this code:
...
7
votes
2
answers
3k
views
Extracting the CIGAR string from a BAM via Python?
Is there a standard method in Python to extract a CIGAR string from the BAM?
There are great libraries which parse the CIGAR, e.g. https://pypi.python.org/pypi/cigar/0.1
...
7
votes
3
answers
1k
views
Read PDB file, extract dihedral angles, modify dihedral angles, reconstruct Cartesian coordinates, and write PDB file
As the title summarizes, I am trying to:
Read a PDB file (for example, 1enh.pdb).
Extract the backbone dihedral angles (phi, psi).
Modify the dihedral angles (phi, ...
7
votes
1
answer
865
views
Filtering bases based on phred qualities with pysam
Is there a way to filter bases in BAM files based on phred quallities through python's pysam ?
I have a code here that
Takes the nucleobases per position from a BAM file using pysam's pileup ...
5
votes
3
answers
4k
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 ...
5
votes
2
answers
273
views
HDF5 and BioSQL solutions
I'm looking at better database/storage solutions for NCBI virus data, with all attributes particularly year and country of isolation, together with structural data, possible antibody data, T-cell data ...
5
votes
2
answers
209
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 ...
5
votes
4
answers
3k
views
How to map PDB chains to Uniprot IDs using API services
I have a lot of PDB IDs and I need to get uniprot fasta sequences of these PDB IDs special chains by API services. For example, imagine that I need to get fasta sequence of '1kf6' 'A' chain. The ...
4
votes
2
answers
810
views
Finding a single open reading frame with ribosomal binding site, using Biopython
I'm given a Fasta file, containing a large DNA(over 115,000 long) sequence, and I am tasked with finding a single large open reading frame contained within the DNA sequence using Biopython.
I'm ...
3
votes
2
answers
242
views
Pepsin digest (cleavage) does not work using RE?
Aim is to code the theoretical peptic cleavage of protein sequences in Python. The cleavage (cutting) rule for pepsin is: 1234^567. This is a position, ...
3
votes
1
answer
2k
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 ...
3
votes
1
answer
3k
views
Greedy Motif Search Using Probability Matrices
In my greedy search with pseudocounts algorithm in my bioinformatics course, I did not follow the pseudocode since I wanted to solve the problem in my own way. Unfortunately, although my answer is ...
3
votes
1
answer
602
views
python does not quit when the input file is too big
I have a script that extracts the set of unique kmer pairs from a kmer dump file (& then using them downstream to guess ploidy).
The script seems to work correctly (it's reporting a meaningful ...
2
votes
3
answers
553
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
765
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 ...
2
votes
1
answer
57
views
2
votes
1
answer
92
views
Infer the new (Ban et. al) ribosomal nomenlature (ex. uL53 ) from the ribosomal protein's sequence
I'm trying to programmatically construct a name for each protein subchain in any ribosome from Uniprot in accordance with Ban et. al's 2014 proposal (excerpt given below) using PDB's and Uniprot's ...
2
votes
2
answers
1k
views
Get a list of PDB ids from a list of sequence protein number?
I am working on a project about phosphorylation, and I am creating a database of some proteins. I have a list of protein accession ids for which I need to get the corresponding PDB file for each one ...
1
vote
1
answer
264
views
reverse translation from amino acid string to DNA strings
what is the opposite of .translate() function calls ?
I mean let's say I am given an amino acid string CYCLIC, how do I obtain all the possible combinations of DNA ...
1
vote
2
answers
211
views
Python/Biopython - Replace amino acid residue on MSA with "z" from a list of unaligned positions
I'm trying to programmatically replace a set of amino acid residues on an MSA with a "Z" from a list of unaligned positions. Any ideas on how I could do this?
Input: a list of unaligned ...
1
vote
2
answers
231
views
Interpreting GWAS results with different settings
I did a bunch of GWAS analysis (linear model without covariates) with applying different quality controls. How to choose the optimal settings when filtering for minor allele frequency (maf), Hardy-...
1
vote
1
answer
59
views
How to allow "half windows" in biopython?
I am using Biopython to examine protein sequences including the Kyte and Doolittle hydrophobicity. However, for short sequences, this returns an empty value; the value is not allowed if the window ...
1
vote
0
answers
197
views
Trying to download a large number of files from ENA programmatically
I am downloading a large number of files from the ENA in Python using Multithreading. As an example, to be more concrete, I tried downloading 12 files simultaneously using 12 threads. I noticed that ...
0
votes
1
answer
951
views
How to convert mzXML to mzML format (mass spectrometry files)?
How to convert mzXML to mzML format (mass spectrometry files) preferably under Linux and/or Python?
0
votes
2
answers
56
views
How to obtain desired output?
I am working on a project using the following command within nano:
...
0
votes
0
answers
198
views
GWAS phenotype data format and preprocessing
I have a set of different phenotypes which I want to use for a GWAS analysis (general linear model). I have a couple of questions and uncertainty about the phenotype data input.
I have control and ...
0
votes
1
answer
200
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
1
answer
33
views
connect same ids with values in id rows (result of effectiveELD)
I can't cope with reworking the result. If id is the same I want to stick those items.
...