Unzip all the genome file and remove all fasta header except first one
#!/bin/bash gzip -d *.gz FILES=$(pwd)/* for f in $FILES do echo "Processing $f file..." if [[ $f =~ \.fna$ ]]; then awk ' /^>/ && FNR > 1 {next} {print $0} ' $f | sed '/^>/{s/ /_/...2545 days ago
Read a tab delimited file and search with perl
use strict; use warnings; use Data::Dumper; use Text::CSV; use IO::Handle; my $file = "/home/urbe/Tools/Alienomics_v0.1/Alienomics/output/intermediate_files/rRNA/refGene.megablast"; open my $fh, "[0]\n"; warn Dumper $row; # To see the structure }2539 days ago
Download the gff files from NCBI using bash script/command
#!/bin/bash # Download the genome from NCBI using command # Create a Dire...ff.gz|' > genomic_file_viral #Read the uerl from file and download FILES=$(pwd)/* for f in $FILES do echo "Processing $f fi...2537 days ago
Reformat the file names with Perl
#!/usr/bin/perl use strict; use warnings;...(copy);; $| = 1; my %hash; my @files = glob "*.scf"; if (!$ARGV...code; } #Chec one by one for (0..$#files){ $files[$_] =~ s/\.scf$//..."."_$pName[1]"."."."scf"; if ( -f "$files[$_].scf" ) { copy("$files[$...2350 days ago
Loop over with all files in a directory in bash
#!/bin/bash FILES=/media/ComparativeGenomics/ncbi-genomes-2017-11-13/* ref=/media/Comparativ...9673v1_genomic.fna path=/home/urbe/Tools/SATSUMA/satsuma-code-0 for f in $FILES do if [ ${f: -4} == ".fna...2345 days ago
Create genome scaffolding with Perl
#!/usr/bin/perl use warnings; use strict; use English...rogram starts here # set default options my @pslFiles = (); my $projOpts = {...emaining command line arguments (hopefully only PSL files) while (@ARGV) { my $argu...2322 days ago
864 days ago
Perl script to read multi fasta sequence one by one
#!/usr/bin/env perl use strict; use warnings; #USAGE #perl rohanRun.pl seq.fa...y $file)=@_; my %sequence; my $header; my $temp_seq; #suppose fasta files contains multiple sequences;...2235 days ago
Perl script to count the number of files in a directory with regex
#!/usr/bin/perl use strict; use warnings; my @allNames=...8_","_E3B2_","_E3T1_","_HPRIM14_","_H158_"); my @files = glob("*.scf *.SCF"); forea...$nName=lc ($name); my $cnt=0; foreach my $file (@files) { #print "$file =~ /$nName/...2251 days ago
Perl script to find coding regions in DNA sequences
#!/usr/bin/perl -w use strict; # if...my $filecodontable = $ARGV[0]; my $filesequence = $ARGV[1]; # ope...econd file) if (!open(SEQUENCE,"< $filesequence")) { print "dnaloglk...To test the program, save this two files in your current working direc...2169 days ago