Extract ids from file with perl
#!/usr/bin/perl use strict; use warnings; my $fh=read_fh("fin.txt"); my %idHash; my $lastKey;...lIds, $cells[0]; } #Delete the last id for secutiry -- might does not fi...{$allIds[-1]}; next if exists $hash{$look_for}; ######################...2599 days ago
picard tools command to get some insert statistics
#picard tools to get some insert statistics to see whether our reads seem to be in the correct place #module load picard/2.0.1 java -Xmx16g -XX:Perm...CollectInsertSizeMetrics MINIMUM_PCT=0 HISTOGRAM_FILE=.pdf INPUT= OUTPUT=....1328 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl extractFASTAwithSIZE.pl finalSample_filtered.fa 0 1000 > aaaaaa.fa my...# Simple access my $seqstr = $db->seq('CHROMOSOME_I',...e (my $seq = ) { # Bio::PrimarySeqI stuff } # Ti...2523 days ago
Download the genome from NCBI using bash script/command
...ash # Download the genome from NCBI using command # Create a Directory mkdir genome cd genome # Look for genome assembly summary and e...> genomic_file_plant # -for archaea curl 'ftp://ftp.ncbi...mic.fna.gz|' > genomic_file_vertebrate_other # -for invert...2523 days ago
Unzip all the genome file and remove all fasta header except first one
...n/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 |...$f > $f.fa else echo "this file is not right file" fi #cat $f...2522 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 }2516 days ago
Download the gff files from NCBI using bash script/command
...ash # Download the genome from NCBI using command # Create a Directory mkdir genome...curl # Commentline if you are not interested in that genom...enomic_file_plant # -for archaea curl 'ftp://ftp.ncbi.nl...> genomic_file_vertebrate_other # -for invertebrate curl...2514 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...; } close LIST; $/ = "\n>"; open OUT, ">$out" or die; open FASTA, "$fasta" or...2509 days ago
2485 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; $aa2506 days ago