Results for "Print"

Wire posts

  • #BAM file to fasta #conversion with #Samtool: samtools view filename.bam | \ awk '{OFS="\t"; print ">"$1"\n"$10}' - > filename.fasta

    2979 days ago

  • #BAM file to #fastaq #conversion with #Samtool: samtools view filename.bam | awk '{OFS="\t"; print "@"$1"\n"$10"\n+\n"$11}' >| filename.fastq

    2979 days ago

  • #Print all line #except those #contains a letter "T" that is not immediately followed by a "H" with: grep -v 'T[^H]'

    2977 days ago

  • Grep all the processor in Linux system $ grep "^processor" /proc/cpuinfo | tail -n 1 | awk '{print $3}' #Grep #OS #Linux #Processor

    2895 days ago

  • #Extract #tabbed info from #BAM file with samtools: samtools view test.bam|awk '{print $1 "\t" $2 "\t" $3 "\t" $4 "\t" $4+length($10)-1}' > file.xls

    2887 days ago

  • #Extract #Chromosome #Number And Start Position #Reads: samtools view bamfile.bam|awk '{print $3 "\t" $4 "\t" $4+length($10)-1}' > newfile.tab

    2881 days ago

  • Extract reference nucleotide from BAM file: samtools view your.bam | awk '{print substr( $10, 100, 1)}' #SAM #BAM #Samtools #Tricks #NGS

    2880 days ago

  • Rename the fasta name perl -ane 'if(/\>/){$a++; @foo = split /\s+/;$_ = join '_', @foo; print "$_\n"}else{print;}' your.fasta > new.fa #PerlTrick #PerlOneliner #Perl

    2803 days ago

  • Extract fasta sequence by Ids: perl -ne 'if(/^>(\S+)/){$c=grep{/^$1$/}qw(id1 id2)}print if $c' fasta.file #Perl #PerlOneliner #PerlTrick #Extract #Ids #Fasta

    2802 days ago

  • Extract sequence by using Ids file (assuming one ids in a line): perl -ne 'if(/^>(\S+)/){$c=$i{$1}}$c?print:chomp;$i{$_}=1 if @ARGV' ids.file fasta.file #PerlTricks #PerlOneliner #Perl #Extract #Ids #

    2802 days ago