Blast script to index and extract sequence !!
# look at the file $ head EC4115.fa >NC_011353.1 Escherichia coli O157:H7 str. EC4115 chro...GGTCACTAAATACTTTAACCAATATAGGCATAGCGCACAGAC .... # query the blast database by id and coord...2852 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...2708 days ago
2704 days ago
2693 days ago
Perl script to insert the DNA string in genome
#!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; use Bio::Seq; my $file = $ARGV[0]; # input fasta...tion chromosome my $pos=10; # position of the insertion my $seqI = "AAAA"; #sequence...2659 days ago
BASH script for SelfBLAST a genome
#!/bin/bash #self BLAST a genome -- Expecting you have blast and samtools installed in your system #Author: Jiten...= "extract" ] then echo "Extracting the sequence $2 for you from $FASTAFILE --...$1 = "all" ] then echo "You want entire sequence...2652 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractF...each my $id (@ids) { my $sequence = $db->seq($id, $querySizeST...SizeED); if (!defined( $sequence )) { die "Sequen...OMOSOME_I'); # Access to sequence objects. See Bio::PrimarySeqI...2532 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,...2518 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; $aa2515 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);2468 days ago