bioinformatics

Finding unique combinations of two sequence (String) Python

Finding unique combinations of two sequence (String) Python Question: Hello i have a question. I got two List like that : list1 = [‘G’,’C’,’A’,’T’,’C’,’A’] list2 = [‘G’,’A’,’*’,’T’,’AC’,’A’] And i wanted in python to find all combination possible of those 2 sequences. For example the result will be : (GCATCA), (GA*TACA), (GAATCA), (GA*TCA), (GC*TCA), (GC*TACA), (GCATACA), …

Total answers: 2

Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards error

Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards error Question: I have a snakemake srcipt like # minimal example configfile: "../snakemake/config.yaml" import os rule generateInclude: input: archaic_inc=config[‘input’][‘archaic_include’], modern_inc=config[‘input’][‘modern_include’] output: all_include=’include_{reference_genome}.bed’ params: reference_genome='{reference_genome}’ shell: """ if [ {params.reference_genome}==’hg19′ ]; then bedtools intersect -a <(zcat {input.archaic_inc} | sed ‘s/^chr//’) -b …

Total answers: 1

Extracting ID from file using python script?

Extracting ID from file using python script? Question: I’m trying to extract just the sequence ID from the the file in Linux server. To give you few examples TRINITY_DN0_c0_g1_i1.p1 and TRINITY_DN0_c0_g1_i3.p1 and sequence IDs. The sequence ID lengths are not same but they all start with TRINITY and ends with .p1. I tried using awk …

Total answers: 2

Create a new variable instance each time I split a string in Python

Create a new variable instance each time I split a string in Python Question: I have a string into a variable x that includes ">" symbols. I would like to create a new variable each time the string is splitted at the ">" symbol. The string I have in the variable x is as such …

Total answers: 3

Trying to create a sliding window that checks for repeats in a DNA sequence

Trying to create a sliding window that checks for repeats in a DNA sequence Question: I’m trying to write a bioinformatics code that will check for certain repeats in a given string of nucleotides. The user inputs a certain patter, and the program outputs how many times something is repeated, or even highlights where they …

Total answers: 3

Reverse complement from a file

Reverse complement from a file Question: The task is: Write a script (call it what you want) that that can analyze a fastafile (MySequences.fasta) by finding the reverse complement of the sequences. Using python. from itertools import repeat #opening file filename = "MySequences.fasta" file = open(filename, ‘r’) #reading the file for line in file: line …

Total answers: 1

match specific pattern with few substitution

match specific pattern with few substitution Question: HI I am working on antibodies where I have to find a specific pattern for it’s antigen specificity using python. I am puzzling over to find a match pattern with predefined numbers of substitution. I tried regex (re.findall/re.search) with possible permutation/combination but this couldn’t solve my problem. Also, …

Total answers: 1

Finding matching motifs on sequence and their positions

Finding matching motifs on sequence and their positions Question: I am trying to find some matching motifs on a sequence, as well as the position that the motif is located in and then output that into a fasta file. The code below shows that the motif [L**L*L] is present in the sequence, when I run …

Total answers: 1

How to get the number of total scattergather items in Snakemake scatter/gather?

How to get the number of total scattergather items in Snakemake scatter/gather? Question: I’m trying out Snakemake’s scatter/gather inbuilts but am stumbling over how to get the number of total splits configured. The documentation doesn’t mention how I can access that variable as defined in the workflow or passed through CLI. Docs say I should …

Total answers: 1