Bash command to explore assembly summary genbank !
wget https://ftp.ncbi.nlm.nih.gov/genomes/genbank/assembly_summary_genbank.txt pip3 install csvkit csvcut -t -K 1 -c 'excluded_from_refseq' assembly_summary_genbank.txt \ | tail -n +2 | tr ";" "\n" \ | sed -e 's/^ //' -e 's/ $//' | grep -v '""' \ | sort | uniq -c | sort -nr781 days ago
Command line to move all files from a directory !
find ~/Downloads/ -type f -print0 | xargs -0 mv -t ~/Videos731 days ago
730 days ago
Awk command to keep only short the fasta header !
awk '/^>/ {$0=$1} 1' file.fasta722 days ago
Raku script to find SSRs in fastq file !
sub find-ssrs(Str $sequence) { my @ssrs; for 2..$sequence.chars ->...my $sequence = $fh.readline.chomp; # Skipping the next two lines (comment and quality lines) $fh.readline;...125 days ago
Raku script to find overlaps between two bed files !
#!/usr/bin/env raku # Check if the correct number of arguments are provide...# Read the contents of the two BED files my @bed1 = slurp(@*ARGS[0]).lines; my @bed2 = slurp(@*ARGS[1]).lines; # Iterate over each inter...107 days ago
Perl script to parse VCF file !
#!/usr/bin/perl use strict; use warnings; # Usage: ./parse_vcf.pl input.vcf die "Usage: ./parse_vcf.pl input.vcf\n" unless @ARGV; my $vcf_file = shift @AR...107 days ago
Perl script to parse blast results and plot basic stats !
#!/usr/bin/perl use strict; use warnings; use List::Util qw(sum); # Usage: ./parse_blast.pl blast_result.txt die "Usage: ./parse_blast.pl blast_result.txt\n...107 days ago
Perl script to calculate the basic stats of the assembled genome !
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; # Input file containing the genome assembly in FASTA format my $input_file = 'genome_assembly.fasta';...107 days ago
Python script for basic stats of the assembled genome !
from Bio import SeqIO import statistics # Input file containing the genome assembl...if line.startswith('>'): continue # Skip header lines line = line.stri...107 days ago