Results for "Print"

Wire posts

  • print "$^O\n"; To print the OS name in perl #Tipsoftheday #Perl #RegularExpression

    3952 days ago

  • Generate N base genome: perl -e '@b=qw/A T G C/;print ">Genome\n";while($l<N){print @b[int(rand(4))];$l++;}' #Tipsoftheday #Perl

    3905 days ago

  • To count the number of matches in a string !!! $str = "one.two.three.four"; $n =()= $str =~ /\./gi; print $n; #Tipsoftheday #Perl

    3882 days ago

  • To print the matching pattern line perl -ne '/pattern/ && print' infile.gtf #Perloneliner #Tipsoftheday

    3871 days ago

  • perl -nle 'if (/^>/) { $sl = 0; print; next } next if ($sl >= 200); $_ = substr($_, 0, 200-$sl) if ($sl + length($_) > 200); $sl += length($_); print;' file.fa >new.fa #Perl #Extract #Fasta

    3623 days ago

  • Remove the blank space from a fasta file. perl -nlwe 'tr/ //d; print if length' fileName #Delete #Space #Fasta #Perl #Oneliner

    3623 days ago

  • perl -nle '$count += () = /XY[0-9]+/g; END {print $count}' inputfile #Count #Perl #Perloneliner

    3649 days ago

  • zcat input_file.fastq.gz | awk 'NR%4==1{printf ">%s\n", substr($0,2)}NR%4==2{print}' > output_file.fa #fastaQ2fasta #fastaq #fasta #Oneliner

    3648 days ago

  • Extract list of read ID from bam file: samtools view mbi.sorted.bam |perl -ne '/ID/ && print' > extractedID.sam #Extract #Ids #SAM #BAM #NGS

    3637 days ago

  • Count the contigs length in index fasta file with samtools. $ awk '{s+=$2}END{print s}' scaffolds.fasta.fai #Fasta #Index #Length #Count #Size #Samtools

    2146 days ago