Extract fasta sequence with Ids with Bash script
#!/bin/bash while IFS='' read -r line || [[ -n "$line" ]]; do echo "Text read from file: $line" samtools faidx ONT.fasta $line > $line.faa done < "$1"2369 days ago
Reformat the file names with Perl
.../perl use strict; use warnings; use File::Copy qw(copy);; $| = 1; my %hash; my @files = glob "*.scf"; if (!$ARG...$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-...home/urbe/Tools/SATSUMA/satsuma-code-0 for f in $FILES do if [ ${f: -4} == ".fna" ]; then echo "Processing $f file..." ff=$(basename "${f%.*}...2346 days ago
Convert fastq to fasta in Perl
...$zcat, 'zcat seq.fastq.gz |' or die $!; my $in=Bio::SeqIO->new(-fh=>$zcat, -format=>'fastq'); my $out=Bio::SeqIO->new(-file=>'>seq.fasta',...2345 days ago
Insert the sequence at desire location in multi-fasta file with Perl
#!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; use Bio::Seq; use File::Copy; #ARGV[0] should be in following format --- Keep the coordinate sorted by name+locati...2328 days ago
Create genome scaffolding with Perl
...NAME psl_scaffolder.pl - use self-mapped PSL file to scaffold a genome =head...am starts here # set default options my @pslFiles = (); my $projOpts = {...ning command line arguments (hopefully only PSL files) while (@ARGV) { my $arg...2323 days ago
Plot the clock using Lastz -gerenal outfile
...t::Util qw(sum); #Usage perl clockPlot.pl Palindrome.palfc 1500 my $R = Statistics::R->new() ; $R->startR ; my $fileN=$ARGV[0]; my $mSize=$ARGV[1]; open (my $fh2, $fileN) or die "Could not open file...2313 days ago
Plot the density of genes in R
...%in% rownames(installed.packages())){ library(ggplot2) } else { install.packages("ggplot2") library(ggplot2) } # import a text file with gene positions # column...2298 days ago
864 days ago
864 days ago