Bioinformatics

Random 1 liners

#filter fastq file to remove sequence of x  length

awk ‘BEGIN {OFS = “\n”} {header = $0 ; getline seq ; getline qheader ; getline qseq ; if (length(seq) >= 100) {print header, seq, qheader, qseq}}’ < in.fastq > filtered.fastq

#get fasta sequence via command line of Accession BA000007.2

esearch -db nucleotide -query BA000007.2 | efetch -format fasta >output.txt