2067 days ago
2011 days ago
Command to sort the bed file !
#Command to sort the bed file sort -V -k1,1 -k2,2 test.bed1381 days ago
Bash script to get exon fragments from genome files !
#Exons are already defined in the GTF file, so we simply need to print lines that are marked exonic. gunzip -c genome_file.gtf.gz | awk 'BEGIN{OFS="\t";} $3=="exon" {print $1,$4-1,$5}' | bedtools sort | bedtools merge -i - | gzip > my_exon.bed.gz1358 days ago
Bash script to extract intronic fragments !
#To obtain introns, we simply need the gene and exonic coordinates; #by subtracting the exonic regions from the genic region, we have the intronic region. gunzip -c...1358 days ago
Bash script to get intergenic region from genome files !
#For the intergenic region, we will require the size of the chromosomes. wget http://xxx.chrom.sizes cat xxx.chrom.sizes | sed 's/^chr//' | sed 's/Cp/Pt/' > tmp mv t...1358 days ago
291 days ago
Raku script to find overlaps between two bed files !
#!/usr/bin/env raku # Check if the correct number of arguments are provided if @*ARGS.elems != 2 { say "Usage: ./compare_bed_files.raku file1.bed file2.bed";...86 days ago
Perl script to find overlaps between two bed files !
#!/usr/bin/perl use strict; use warnings; # Check if the correct number of arguments are provided if (@ARGV != 2) { die "Usage: $0 file1.bed file2.bed\n"; } # Read the contents of the two BED files my $file1 = shift @ARGV; my $file2 = shift @ARGV; open my $fh1, '86 days ago