# Tag Info

Accepted

### What is a quick way to find the reverse complement in bash

Thanks to Manu Tamminen for this solution: echo ACCTTGAAA | tr ACGTacgt TGCAtgca | rev
• 2,086

### Removing duplicate FASTA sequences based on headers with Bash

If you want to avoid using extra libraries for any reason, you can just use a simple Python script (version 3.6 and above) to do this: ...
• 496
Accepted

### How to merge .fastq.qz files into a single .fastq.gz with their same id without losing any content in parallel

All you need is cat. You won't find any better tool for a simple job like this. Just run: ...
• 8,151

### Removing duplicate FASTA sequences based on headers with Bash

You can use seqkit for this purpose. seqkit rmdup -n seqs.fa -o seqs_without_duplicate.fa
• 609

### Edit FASTA header using sed

awk 'BEGIN{FS="::"}{if($1~">"){printf(">%s_%s\n",$2,substr($1,2))}else{print$0}}' input_file.fa > output.fa An explanation of the non-obvious bits: <...
• 19.2k
Accepted

### Calculating average coverage for .bam files (sequence data)

For a quick estimate you’re making it more complicated than necessary. The theoretical average coverage is $\frac{n \cdot \hat l}{N}$ where $n$ is the number of reads, $\hat l$ is the average read ...
• 4,765
Accepted

### How to get rows with similar values in two different columns using command line?

I think it is easy to do with awk, e.g. see here. For your example, with your data in file: ...
• 2,782
Accepted

### How to extract values from second file on the basis common first column?

I like to use the join command for this. For your example above, you can simply use the following: ...
• 527

### What is a quick way to find the reverse complement in bash

Reverse complement FASTA/Q: seqtk seq -r in.fa > out.fa https://github.com/lh3/seqtk
• 69
Accepted

### how to remove range from fasta header

Invest some time in learning unix tools such as grep, sed and awk. ...
• 1,367
Accepted

### How to align output of grep --color=always? (To QC fasta/fastq files)

Perhaps, grep is not the best tool to use in this case, but it should be in principle possible by using grep & ...
• 2,695

• 1,332

### Bash scripting FastQC for multiple fastq files in multiple directories

multiqc kind of glazes over some important information, like the exact adapters and duplicated sequences in a library. If you plan to spend big  for sequencing a ...
• 3,091
Accepted

### How can I run a command for multiple files?

Assuming all your vcfs are in the same folder: ...
• 796
Accepted

### Changing this code in a way to work for my files

Using shell loops for text practice is considered bad practice. It is exceedingly slow, the syntax is complicated so it's very easy to get it wrong and it's just painful. The shell isn't designed as a ...
• 8,151
Accepted

• 3,477
Accepted

### Moving file based on their names

First of all you are getting an error because you are missing a then in the third line of your code and then a fi to close the <...
• 3,477

### Removing duplicate FASTA sequences based on headers with Bash

One way using awk: awk '/^>/ { f = !a[\$0]++ } f' seqs.fa Explanation: The above is basically the same as: ...
• 777