Hello,
I have a problem to join two files
i have a first file:
Chr1 2242256 2 Parent=AT1G07290.1
Chr1 2242257 2 Parent=AT1G07290.1
Chr1 2242258 2 Parent=AT1G07290.1
Chr1 2242259 2 Parent=AT1G07290.1
Chr1 2242260 2 Parent=AT1G07290.1
Chr1 2242261 2 Parent=AT1G07290.1
Chr1 2242262 2 Parent=AT1G07290.1
Chr1 2242263 2 Parent=AT1G07290.1
Chr1 2242264 2 Parent=AT1G07290.1
Chr1 2242265 2 Parent=AT1G07290.1
.
and a second one
AT1G01010.1 1688
AT1G01020.1 1623
AT1G01020.2 1085
AT1G01030.1 1905
AT1G01040.1 6251
AT1G01040.2 5877
AT1G01046.1 207
AT1G01050.1 976
AT1G01060.1 2704
AT1G01060.2 2814
When i'm doing
Code:
cat /data/a2e/kassam/Thaliana/file.covexons.Chr[12345] | awk -F "\t" '{sub('/Parent='/,"");print}' |awk '{cov[$1"_"$2]=cov[$1"_"$2]+$3} END {for (pos in cov) {p=pos ; sub(/_/," ",pos) ; print pos,cov[p]}}' |awk '{pos[$1]=pos[$1]+1 ; bp[$1]=bp[$1]+$3} END {for (feat in pos) {print feat,bp[feat],pos[feat]}}' | sort -k1,1 |join -1 1 -2 1 /Quesneville_GFF3_exons_only.lens - > /data/file.covexonsByTranscript
i have an empty file, i think my join 1 of the first file after the awk is a chr and not an AT1...... so how can I can change it?