# Tag Info

### How I can change the name of multiple files at once in R or terminal?

Use perl-rename. This is usually called rename on Debian-based systems like Ubuntu or Mint, and ...
• 9,034
Accepted

### Writing a perl script to holding information for two genes

Perhaps this small test script will help demonstrate some of the principles: ...
• 3,085
Accepted

### How I can change the name of multiple files at once in R or terminal?

just to complete your question, you can do it in R in one line. After setting the directory as your working directory, just type the following: ...
• 1,021

### Parse out exon coordinates from bed file for each gene

There are multiple ways to go about it. On the command line you can make a 1 line BED file: chr1 11868 12227 And then ...
• 19.4k

Regading the perl vs python discussion, there is no final answer which language is better, but I have some advice for you: Learn the language your colleagues or your advisor use. This way you are ...
• 290

Currently you could use either but a major question is which platform will others be using in the future. AFAIK Perl is only superior to Python for regex. Based on the trend I see for new programmers ...
• 1,568

This usually comes down to religious issues, so let me try and steer it back to more objective grounds: What language do you know (better)? Use the library for that one. If you know neither and will ...
• 778

### Convert population allele count into population allele frequency by using Perl or Python (translate available Bash into Perl or Python)

I don't know how fast you need it to be, but this R solution runs on 20 million SNPs in under 2 min on my laptop: ...
• 1,806
Accepted

### Bioperl - how can i print first result of search sequence per iteration?

In the simplest case, if you just want to stop after the first record was printed, you can just add exit (I also corrected the syntax errors you had and added ...
• 9,034
Accepted

### Pattern mining from a genomic sequence

echo ">ATGCTTATTGCCCATTTCGTGCATGCATATGCGCATTCGCGATCGATTAGGGATAT" | grep -oP 'TTCG[CGT][ATGC]{1,15}TTCG[CGT]' [CGT] looks ...
• 3,652

• 9,034
Accepted

• 9,745

### replacing SNPs with missing calls with a specific string

A possible approach in plain python: ...
• 3,040

### Writing a perl script to holding information for two genes

The following Perl documentation pages should be informative: split - for splitting a scalar at all matches of a defined pattern perlreftut - discusses the approach of anonymous variables and how to ...
• 12.8k

### assigning different characters to present and absent genes from blast output using perl or python

Here is a way to do it using a python dictionary: ...
• 3,040

### assigning different characters to present and absent genes from blast output using perl or python

Using python it should be relatively trivial, using sets. The following snippet works with your pangenome file and one blast ...
• 957
Accepted

### How to separate a microbial strain of MTB resistant and susceptible drugwise?

Since this involves combining multiple conditions, it is easier (and certainly more readable if you ever need to come back to it later) to write a script to do this. For example, in perl: ...
• 9,034

### Error while performing "lift-over" of genomic coordinates between two species using Ensembl Compara API

While I wouldn't consider this as the best answer or solution - I decided to use Ensembl REST api to extract the coordinates of alignment blocks. The quick fix - in python looks like this: ...
• 325
Accepted

### Multi-line efetch digging

Not exactly what you were looking for but may be you can use something like this? ...
• 1,196

I fear this entire thread is going to veer dangerously close to opinionation. But regardless of how one feels about the Perl language and its various libraries and communities, I think we can ...
• 5,010

### storing SNPs in the genotype file for each chromosome in a separate file

I believe a pandas approach would be fast enough (probably faster than any other Python approach without pandas). After converting your table to a ...
• 3,652
Accepted

### how to use list of gene id to get cds sequence(cds fasta file have many annotation, only gene id: is same to query id)

If you can use awk, you could use this simple script: ...
• 353

### Removing stop codons from alignment file for dn/ds calculation

I would align your sequences with the software available here: https://github.com/veg/hyphy-analyses/tree/master/codon-msa
• 21
Accepted

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

If these are all GenBank or RefSeq accessions, you can use Entrez Direct for this as shown below: ...
• 1,196