点击查看代码
sed 's/"/\t/g' ./genes/genes.gtf | awk 'BEGIN{OFS=FS="\t"}{if($3=="gene") {if($7=="+") {start=$4-2000; end=$4+500;} else {if($7=="-") start=$5-500; end=$5+2000; } if(start<0) start=0; print $1,start,end,$16,$10,$7;}}' >GRCh38.promoter.bed
bedtools getfasta -name -s -fi ./fasta/genome.fa -bed GRCh38.promoter.bed >GRCh38.promoter.fa
cut -d ':' -f 1 GRCh38.promoter.fa >GRCh38.promoter.simplename.fa
浙公网安备 33010602011771号