Extract ids from file with perl
#!/usr/bin/perl use strict; use warnings; my $fh=read_fh("fin.txt"); my %idHash;...##################################################### #Open and Read a file sub read_fh { my $filename =...2655 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:PermSize=8g -jar $PICARD_HOME/pi...1384 days ago
Extract fasta sequence from a multifasta file with coordinates
#!/usr/bin/perl use Bio::DB::Fasta; #USAGE perl...$querySizeED = shift; my $db = Bio::DB::Fasta->new( $fastaFile ); my @ids = $db->get_all_primary_ids; fore...uence\n"; } __END__ use Bio::DB::Fasta; # Create d...'); # Access to sequence objects. See Bio::PrimarySeqI....2579 days ago
Download the genome from NCBI using bash script/command
#!/bin/bash # Download the genome from NCBI using command # Create a...-for fungi curl 'ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/f...or archaea curl 'ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/a...vertebrate curl 'ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/i...2579 days ago
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...2578 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 }2572 days ago
Download the gff files from NCBI using bash script/command
#!/bin/bash # Download the genome from NCBI using command # Create a...-for fungi curl 'ftp://ftp.ncbi.nlm.nih.gov/genomes/refseq/f...v/genomes/refseq/archaea/assembly_summary.txt' | awk '{FS="\t...0} ' | sed -r 's|(ftp://ftp.ncbi.nlm.nih.gov/genomes/all/.+/)...2570 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,...2565 days ago
2541 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; $aa2562 days ago