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. AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAA...2873 days ago
Perl script to insert sequence in contig !!
# sub signature: #insertSEQintoCONTIGatLOC( SEQ , CONTIG , LOC ) ; sub insertSEQintoCONTIGatLOC{ my ( $SEQ , $CONTIG , $LOC ) = @_; substr( $CONTIG , $LOC , -le...2729 days ago
2725 days ago
2714 days ago
Perl script to insert the DNA string in genome
#!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; u...s=10; # position of the insertion my $seqI = "AAAA"; #sequence of the insertion my $seq_i...'fasta',-file => ">".$out); while( my $seq = $seq_in->next_seq...2680 days ago
BASH script for SelfBLAST a genome
#!/bin/bash #self BLAST a genome -- Expecting you have blast and samtools installed in...f [ $1 = "extract" ] then echo "Extracting the sequence $2 for you from $FASTAFILE --...elif [ $1 = "all" ] then echo "You want entire sequence...2673 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta;...reach my $id (@ids) { my $sequence = $db->seq($id, $querySizeST...ySizeED); if (!defined( $sequence )) { die "Sequen...ROMOSOME_I'); # Access to sequence objects. See Bio::PrimarySeqI...; while (my $seq = $stream->next_seq...2553 days ago
Extract fasta sequence from a multifasta file with fasta header Ids
#!/usr/bin/perl use strict; use warnings; #Usage: perl my $list = shift @ARGV; my $fasta = shift @ARGV; my $out = shift @ARGV; my %select; open LIST,...2539 days ago
Compress and decompress the sequence with perl
use strict; use warnings; my @char; while () { @char = split //; } comp(\@char); #--------------------- my $com= "r0a3m4a4j0"; my @com = split //, $com; dcomp (\@com); #dcomp sub here sub dcomp { my ($com_ref)=@_; my @com=@$com_ref; my $car; for (my $aa=0; $aa2536 days ago
Extract the fastq sequence with range in Perl
use Bio::DB::Fasta; open(POSITIONS,"positions.txt"); while(){ chomp; my ($seqName,$begin,$end) = split(/\s/); my $db = Bio::DB::Fasta->new('allGenomeContacted.fa'); my $seq = $db->seq("$seqName", $begin => $end); print "$seq\n"; } close(POSITIONS);2489 days ago