Count number of lines in each file in Linux !
for FILE in *.rd; do wc -l $FILE; done > allReads.hits810 days ago
Bash command to count reads in fastq file !
#ref fastq file #ref1_1.fq) echo $(( $(wc -l795 days ago
Perl script for chi-squared test !
...e(my $entry = $fasta->nextEntry) { my $seq = uc($entry->seq); # to count dinucleotides, loop through sequence, take 2 bp and increment the hash counter foreach my $i (0..length(...415 days ago
Raku script to calculate GC content !
sub calculate-gc-content(Str $sequence) { my $gc-count = $sequence.comb(//).elems; my $total-bases = $sequence.chars; return $gc-count / $total-bases * 100; } m...115 days ago
Python script to find repeats in the DNA sequence !
...for i in range(len(sequence) - min_repeat_length + 1): substring = sequence[i:i+min_repeat_length] if sequence.count(substring) > 1 and substring...98 days ago
Raku script to find microsatellites in DNA fragments !
...ength = 2, $max-repeat-length = 6, $min-repeat-count = 3) { my @microsatellit...$sequence.chars - $repeat-length * $min-repeat-count + 1) -> $i { my...if $sequence.contains($substring x $min-repeat-count) { @microsat...98 days ago
Perl script to calculate the basic stats of the assembled genome !
...} return 0; # Should not reach here } # Subroutine to calculate GC content sub calculate_gc_content { my ($file) = @_; my $gc_count = 0; my $total_bases = 0...98 days ago
Python script for basic stats of the assembled genome !
...ngth # Calculate GC content def calculate_gc_content(file): gc_count = 0 total_bases = 0...e # Skip header lines line = line.strip() gc_count += line.count('G') + line.cou...98 days ago