2069 days ago
2013 days ago
Command to sort the bed file !
#Command to sort the bed file sort -V -k1,1 -k2,2 test.bed1383 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.gz1359 days ago
Bash script to extract intronic fragments !
...m the genic region, we have the intronic region. gunzip -c genome_file.gtf.gz | awk 'BEGIN{OFS="\t";} $3=="gene" {print $1,$4-1,$5}' | bedtools sort | bedtools subtract -a stdin -b my_...1359 days ago
Bash script to get intergenic region from genome files !
.../Cp/Pt/' > tmp mv tmp xxx.chrom.sizes gunzip -c genome_file.gtf.gz | awk 'BEGIN{OFS="\t";} $3=="gene" {print $1,$4-1,$5}' | bedtools sort -g xxx.chrom.sizes | bedtools complement -i stdin -g x...1359 days ago
293 days ago
Raku script to find overlaps between two bed files !
...nts are provided if @*ARGS.elems != 2 { say "Usage: ./compare_bed_files.raku file1.bed file2.bed"; exit 1; }...lurp(@*ARGS[1]).lines; # Iterate over each interval in the first BED file for my $line1 (@bed1) {...88 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, '88 days ago