Questions tagged [python]

python is a programming language, widely used in bioinformatics

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

Unable to execute DSSP algorithm from BioPython

I have the following settings in PyCharm: BioPython is properly installed: dssp_test.py ...
1
vote
1answer
28 views

snakemake multiple parameters for multiple input and single output in snakemake. ConbineGVCFs gatk problem

I have written a rule for CombineGVCFs in gatk4. The rule is as follow ...
0
votes
1answer
33 views

creating a dictonary in Python

From the FASTA header I get the following information: ...
1
vote
1answer
33 views

How to plot the gap distribution of contigs wrt to reference genome

I have a contigs file that I generated using Minia and then I have used Minimap2 to map these contigs again to the reference genome. Now I want to plot the gap distribution i.e. gap distance of the ...
0
votes
1answer
50 views

Help to understand the code for dipeptide composition calculation (in python)

Dipeptide composition of a protein sequence is the number of times a particular dipeptide (e.g. Arginine-Histidine) occurs in a sequence divided by the total number of dipeptides in the sequence (...
-1
votes
0answers
36 views

Calculating the p-value for fold changes using Python

I've been thinking about replicating a function on Perseus (Bioinformatics software used in proteomics) and I was wondering if there is a way to calculate the p-value of a fold change on Python using ...
3
votes
3answers
85 views

Subset GTF file for specific genes

I have a GTF file (in 'test.gtf' file): ...
1
vote
1answer
48 views

Translate all reads in a .fastq into protein sequence from deep mutational scanning experiment

I'm working with paired-end NGS reads from an Illumina platform. The sequences I have are all of the same gene, but have one or more substitution mutations each. Here is a rough workflow for ...
0
votes
0answers
30 views

How to get a consensus sequence from a nanopore fastq files?

I am new in bioinformatic field. I would like to know a way to generate a consensus sequence from nanopore fastq files (fastq files demultiplexed). I usually generate a consensus sequence with "...
1
vote
1answer
33 views

How can I calculate the distances between two specific residues of a protein from a PDB file?

Suppose, we have a protein (16PK). We are considering a 5-residue segment/window. If we assume ASN10 to be the ...
0
votes
0answers
41 views

BWA-MEM2 alignment-Snakemake

I have started using snakemake 6.5.2 to align fastq files with reference file. I have pasted the error below in this question. How to allocate memory in the snakefile and read the header from samfile, ...
0
votes
1answer
31 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.
0
votes
0answers
16 views

Retrieve gene symbols of genes from GO term with Python

Is there a way to retrieve the gene symbols belonging to a GO term with Python ? For example, the GO:0006096 (glycolytic process) contains 96 genes: ...
0
votes
1answer
48 views

PyMol: Output Polar Contacts Between Chains to Text File

I am new to PyMOL but have a very specific task that I need to do. I have a PDB structure file of protein homo-oligomer, and I want to use PyMol to determine polar contacts between chain A and all ...
-1
votes
2answers
73 views

How to read and edit a FASTA file with python using regular expression?

I have a file containing protein sequence information of 100 odd proteins. Each sequence starts with a header that looks like this: ...
4
votes
1answer
150 views

R limma alternatives in Python

The R package limma is ideal to perform differential expression analysis. Is there any limma alternative in Python? I'm trying ...
0
votes
0answers
19 views

Python script to simultaneously generate multiple pdbqt files for AutoDockTools?

I have a folder of pdb ligand structures that I'd like to test in some docking experiments with a certain protein using AutoDock Vina. I am not familiar with Python so I've always been using the ...
0
votes
1answer
25 views

calculating kmer nucleotide frequency per column

I have a list of sequences: CAGGTAGCC CCGGTCAGA AGGGTTTGA TTGGTGAGG CAAGTATGA ACTGTATGC CTGGTAACC Each sequence is nine nucleotides long. I want to calculate ...
0
votes
0answers
74 views

Python script to calculate properties of amino acids and storing them in matrix

I want to make a python script that can get as input sequence of N amino acids, and the output is a matrix of Nx6 containing 6 features. The features are: Computed volume Hydrophobicity Polarity ...
2
votes
1answer
46 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 ...
0
votes
1answer
36 views

Time complexity of the Neighbors function

I implemented the following find_neighbors_with_expected_hamming_distance function that generates all k-mers of Hamming distance at most d from the given Pattern. ...
0
votes
3answers
71 views

Count of each sequence length from a fasta file with header using len function of python

I have a fasta file with 18 sequences inside. I want to extract the length of each sequence with header using the len function. My file looks like: ...
2
votes
1answer
41 views

Programmatically adding hydrogen and remove water to multiple PDB files

I'm trying to dock a ligand to several hundred PDB files (receptors). I thus need to prepare the those PDB files like removing water and adding hydrogen. I can do that manually using Autodock or Pymol....
2
votes
3answers
233 views

How to extract subset of protein structure (PDB format) file based on a subsequence of that protein

I looking at a particular protein structure called 2LY4 accessible from RSCB PDB website. The corresponding fasta sequence for that structure is this: ...
2
votes
1answer
38 views

Automatize classical debugging in a bash script? (normal debugging by hand)

And thanks in advance. I am debugging a text file which is the one the two inputs on the program RGmatch https://bitbucket.org/pfurio/rgmatch/src/master/. The code works. Is that some records give ...
4
votes
1answer
42 views

How do you convert Raw Alignment Score to Bit Score?

I'm coding a pipeline where I make a lot of pairwise alignments, and I end up with raw alignment scores. But, I really need to look at my results in terms of bit scores. I know that the formula is: $𝑆...
3
votes
0answers
40 views

How can I use statistics to compare microbial phenotypes?

Note: this question has also been asked on Biostars I am currently trying to create a theoretical argument that a microbe's phenotype can affect gene expression in their host. I have 5 species of ...
0
votes
0answers
34 views
1
vote
1answer
47 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 (...
1
vote
0answers
19 views

Convert genbank file into tbl file [closed]

I want to submit some phage sequences to NCBI. So I want to transform a genbank file into a tbl file. Can someone help me please? Thanks
1
vote
1answer
32 views

How to detect bedtools version used by pybedtools (in order to correctly preserve strand information when merging gtf records)

I have issues working with pybedtools due to strand information being lost after extracting and merging transcript coordinates from a gtf file. It seems that the solution to preserve strand ...
2
votes
1answer
38 views

How to know if ID correspond to nucleotide sequence or protein with a script

I have a text file that contains a list of IDs (314 sequences): AVP78031.1 AVP78042.1 ATO98108.1 ATO98120.1 ATO98132.1 ... My goal is to make a script (maybe using ...
1
vote
2answers
40 views

How to input the opposite strand of DNA?

I am trying to write a program that will count the repeats of a given DNA strand: I am using a Counter library, something like this code shown below ...
1
vote
0answers
31 views

Load balancing numerous single-threaded processes with Snakemake on the grid

I'm familiar with running Snakemake in a DRMAA-enabled grid environment. (Most often, I write Python programs as wrappers and invoke the workflow via Snakemake's Python API.) Typically, I'm running ...
0
votes
1answer
44 views

Common gene naming conventions and how to convert between them

I have two questions, one is a direct question about some RNA expression data. The other is more broad, but motivated by the first. I have downloaded an expression set for a class project and I am ...
0
votes
2answers
121 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
0answers
39 views

Error during File conversion

Conversion of a multi-entry sdf to a multi-entry pdb file with open babel results in the loss of the compound names in the resulting PDB file. Why do you think this might occur and how can I resolve ...
1
vote
1answer
31 views

Create a NHX phylogeny format with r or python

I need help to add information in my phylogenetic tree on each branch. I have two pieces of information at my disposal: 1 ) A phylogenetic tree in newick format : <...
2
votes
0answers
55 views

Snakemake fails because it cannot create logs inside a read-only Singularity Container

I am using Snakemake from inside a Singularity container. Because of that, the directory that Snakemake wants to log to cannot be created, and I get an ...
3
votes
2answers
99 views

Create new range based from existing range (python)

I have a pyranges object that I am looking to iterate over. For each range, I would like to "resize" it to its centre (so start+end/2) and save that into ...
0
votes
0answers
31 views

Reliably create female and male individuals in a -ped file for plink

For a study I need some kind of "decoy" GWAS-data. For this I created a panel with some genes, the same ones as in the real data. From NCBI I fetch some of their SNPs and create my own ...
1
vote
1answer
64 views

How can I use pandas agg here to avoid iteration?

can anyone help me improve this pandas code? ...
1
vote
1answer
226 views

How to convert a SDF molecular structure file to a pandas dataframe with Python?

What is the best python tool to convert a SDF file to a structured data frame (pandas.DataFrame). Similar to Molconvert from ChemAxon? SDF can have different datafields for each compound which I would ...
0
votes
0answers
20 views

How to fetch all protein sequences from c3.ai Covid datalake?

I want to download ALL currently known protein sequences for all SARS-CoV-2 strains. I am not sure how up ...
1
vote
1answer
436 views

What changed wwith Python in WDL change from draft 2 to version 1?

I'm updating my WDL from draft 2 (whichs works fine) to version 1. I'm stuck with a Py snippet ...
0
votes
1answer
227 views

OpenAPI-Generator Python Client Instructions Examples

Trying to learn a little bit of Python and Biopython I ended up figuring out what a Rest API is when the RCSB PDB repository released its new Rest API. I tried to retrieve info from the PDB repository ...
-1
votes
2answers
70 views

How can I convert Protein ID to PDB ID?

I have a list of Protein ID such as Q9S9U6, A2XLL2, Q06402. What name is this ID? UniProtKB ID? And how can I get PDB ID from this list? Is its PDB ID only one? I'm using Python. Get a list of PDB ids ...
0
votes
0answers
35 views

How can I get properties from each one letter amino acid?

Im using python and wish to get properties from each one letter amino acid? I mean M(Met) => Density:1.340, MW:149.21... The RDkit methods atom.GetSymbol(), atom.GetDegree() permit this and I am ...
0
votes
1answer
96 views

Loop Pymol command get_area

I want to select multiple residues from different PDB files loaded on the same pymol session. select resi LIG get_area sele How do I loop the above command to ...
1
vote
1answer
37 views

Segment cell organelles with pixellib

I've got some images of cell organelles and I really want to avoid labeling them by hand. The images all look something like the image below. Is there already an existing model specifially for cells? ...

1
2 3 4 5
7