Python script to download covid genome !
#!/usr/bin/env python3 # these are the publicly available "complete" sequences # https://www.gisaid.org/ has more (1200?), but they require you to sign up impor...1150 days ago
Download genome using NCBI esearch command line !
#Download using command line "NC_005956.1" / "CP003784.1" esearch -db nucleotide -query "NC_005956.1" | efetch -format fasta > seq1.fa esearch -db nucleotide -que...1115 days ago
R script to visualize fastANI core-genome comparison
####### # Purpose: Visualize fastANI core-genome comparison # Usage: Rscript # Output: .pdf # Uses genoPlotR package: http://genoplotr.r-forge.r-project.org #Par...1115 days ago
Extract a random sequence from a file
...open my $in_fh, '', $outputfile; my $size = 21; my $count = 1...unless $line =~ /^([ATGCN]+)/; my $genome = $1; my $len_genome = length $genome; my...@start_points = shuffle(0 .. $len_genome-$size); next unless @start_poin...2929 days ago
2924 days ago
Perl script to generate a random psuedo DNA sequence !
#!/usr/bin/perl print "Enter a number of nucleotides: \n"; chomp ($N = ); @b=qw/A T G C/;print ">Genome\n";while($l2897 days ago
Perl script to extract fasta sequence by matching name/ids !!
#!/usr/bin/perl use strict; use warnings; use Text::Trim qw(trim); #...g; my @ids=split (/\t/, $_); $select{$ids[0]} = 1; } my $size = keys %select; print "Total Ids $size\n"; close LINE; $/ = "\n>...2889 days ago
Perl script introduces control structures, arrays and hashes.
#!/usr/bin/env perl use strict; use warnings; m...irst_array[0], "\n\n"; # Scalar gives actual size of an array my $size_of_array = scalar(@first_arra...rray: $size_of_array\n\n"; print "Perl's index size of array: $#first_array\n\n";...2876 days ago
Blast script to index and extract sequence !!
# look at the file $ head EC4115.fa >NC_011353.1 Escherichia coli O157:H7 str. EC4115 chromosome, complete genome. AGCTTTTCATTCTGACTGCAACGGGCA...7:H7 str. EC4115 chromosome, complete genome AGCTTTTCATTCTGACTGCAACGGGCAA...7:H7 str. EC4115 chromosome, complete geno...2866 days ago
Extract a range from genome file with perl.
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; my $in_file = $ARGV[0]; my $start_pos = $ARGV[1]; my $end_pos = $ARGV[2]; my $in = Bio::SeqIO->...2641 days ago