Results for "C"

Bio-Scripts

  • QV calculation in Bash !

    # $1 = vcf file # $2 = input bam file # $3 =...UM_BP=`samtools depth $2 | perl -e '$c = 0; while(){chomp; @s = split(/\t/); if(sca...|grep -v "#" | awk -F "\t" '{if (!match($NF, "0/1")) print $1"\t"$2"...4)-length($5)}} END { print SUM}'` echo "num snp: "$NUM_SNP perl...

    1656 days ago

  • Samtools commands for bioinformatician !

    ## count mapped reads samtools view -c -F 260 mapping_file.bam ### converting sam file into fasta...### viewing bam files (view command) samtool view sal_sej....put only potential variants bcftools view -c -v sal_vars.bcf...# and rows: total reads, duplicates, mapped. samtools flagst...

    1654 days ago

  • Perl subroutine to creating kmer !

    sub k_mers { my ($sequence, $k) = @_; my $len = length($sequence); my @result = (); for (my $i = 0; $i

    1619 days ago

  • Perl script to remove duplicated lines !

    #!/usr/bin/perl use strict; use warnings; { $_ = ; my $next_line; while( $next_line = ) { #print "current line: $_ -- next line:...ne$/"; print $_ if $_ ne $next_line; } continue { $_ = $next_l...

    1612 days ago

  • Bash script to download SRA file !

    #We can use the sratoolkit to directly pull the sequence data (in paired FASTQ format) from the archive. fastq-dump is in the SRA toolkit...nloading data from a particular sequencing run ID fastq-dump --spl...put things into FASTQ for further processing. The --split-files part...

    1611 days ago

  • Bash script to alignment of short reads against reference genome !

    ...40 -R '@RG\tID:K12\tSM:K12' \ E.coli_K12_MG1655.fa SRR1770413_1...12 and the sample name K12" #reference and FASTQs E.coli_K12_MG1655...R1770413_2.fastq.gz --- this just specifies the base reference file...R1770413.bam --- this marks reads which appear to be redundant PCR d...

    1611 days ago

  • Perl6 script to count ATGC !

    use v6; my $default-input = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC"; sub MAIN($input = $default-input) { "{.map({ +$input.comb(/$_/) })}".say; } #I love perl v6

    1611 days ago

  • Install Samtools, Bcftools and htslib on Ubuntu !

    #Inspired from online search sudo apt-get update sudo apt-get install gcc sudo apt-get install make s...-dev sudo apt-get install libncurses5-dev sudo apt-get inst.../usr/bin wget https://github.com/samtools/htslib/releases/do...t https://github.com/samtools/bcftools/releases/download/1.9/b...

    1609 days ago

  • Bash commandline to install Anaconda !

    ...he line begins with $ are the commands $ mkdir tmp $ cd tmp/ $ curl -O https://repo.anaconda.com/archive/Anaconda3-201...h7d1a2b0_0 ... installing: mpc-1.1.0-h10f8cd9_1 ... install...... installing: simplegeneric-0.8.1-py37_2 ... installing:...

    1607 days ago

  • Bash command to install Miniconda !

    ...-2 tmp]$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest...- Or specify a different location below [/data/sata_dat...- openssl==1.1.1d=h7b6447c_3 - pip==19.3.1=py37_0...inux-64::sqlite-3.30.0-h7b6447c_0 tk pkgs/...

    1607 days ago