908 days ago
Extract all fasta sequences except ids !
awk 'BEGIN{while((getline0)l[">"$1]=1}/^>/{f=!l[$1]}f' geno...*.rd file cat *.rd > all_reads_hits #count the lines in each file -- go in folder for FILE in *; do wc -l $FILE; done > all_hits_lines.txt...841 days ago
Bash script to split multifasta file !
#Using awk, we can easily split a file (multi.fa) into chunks of size N (here, N=500), by using the following one-li...ich you can find here: http://genometools.org/, which has the following simple comma...836 days ago
836 days ago
Command line to print disk usage on Linux terminal !
#Print disk usage - perl du -h |perl -e'%h=map{/.\s/;99**(ord$&&7)-$`,$_}`du -h`;die@h{sort%h}' #Bash du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh #Base du -scBM | sort -n #More du -s * | sort -rn | cut -f2- | xargs -d "\n" du -sh827 days ago
824 days ago
Count number of lines in each file in Linux !
for FILE in *.rd; do wc -l $FILE; done > allReads.hits819 days ago
Bash command to count reads in fastq file !
#ref fastq file #ref1_1.fq) echo $(( $(wc -l805 days ago
805 days ago
Bash script to find difference between two files !
#lines which are exist only in file2: grep -Fxvf file1 file2 > file3 #lines which are exist only in file1: grep -Fxvf file2 file1 > file3 #lines which are exist in both files: grep -Fxf file1 file2 > file3786 days ago