Skip to content

Commit

Permalink
closing tag should also be removed from all split XML files and then …
Browse files Browse the repository at this point in the history
…added to the final XML file. Fixed #17
  • Loading branch information
suryasaha committed May 18, 2021
1 parent 08ae606 commit ce5d9e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions 5.45-80-cyverse/iprs_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,15 @@ find ./$outdir -type f -name "query.*.tsv" -print0 | xargs -0 cat -- >> $outdir
find ./$outdir -type f -name "query.*.json" -print0 | xargs -0 cat -- >> $outdir/"$inname"'.json'


##REMOVE XML HEADERLINES AND CAT FILES TOGETHER
xmlhead=$(head -n 1 ./$outdir/query.0.xml)
##REMOVE XML HEADERLINES TAILLINES AND CAT FILES TOGETHER
xmlhead=$(head -n 1 $outdir/query.0.xml)
xmltail=$(tail -1 $outdir/query.0.xml)
find ./$outdir -type f -name "query.*.xml" -exec sed -i '1d' {} \;
find ./$outdir -type f -name "query.*.xml" -exec sed -i '$d' {} \;
find ./$outdir -type f -name "query.*.xml" -print0 | xargs -0 cat -- >> $outdir/tmp.xml
echo -e "$xmlhead" | cat - $outdir/tmp.xml > $outdir/"$inname"'.xml'
echo -e "$xmltail" >> $outdir/"$inname"'.xml'


##REMOVE GFF# HEADERLINES AND CAT FILES TOGETHER
gff3head=$(head -n 3 ./$outdir/query.0.gff3)
Expand Down
5 changes: 4 additions & 1 deletion 5.45-80/iprs_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,14 @@ find /data/$outdir -type f -name "query.*.tsv" -print0 | xargs -0 cat -- >> /da
find /data/$outdir -type f -name "query.*.json" -print0 | xargs -0 cat -- >> /data/$outdir/"$inname"'.json'


##REMOVE XML HEADERLINES AND CAT FILES TOGETHER
##REMOVE XML HEADERLINES TAILLINES AND CAT FILES TOGETHER
xmlhead=$(head -n 1 /data/$outdir/query.0.xml)
xmltail=$(tail -1 /data/$outdir/query.0.xml)
find /data/$outdir -type f -name "query.*.xml" -exec sed -i '1d' {} \;
find /data/$outdir -type f -name "query.*.xml" -exec sed -i '$d' {} \;
find /data/$outdir -type f -name "query.*.xml" -print0 | xargs -0 cat -- >> /data/$outdir/tmp.xml
echo -e "$xmlhead" | cat - /data/$outdir/tmp.xml > /data/$outdir/"$inname"'.xml'
echo -e "$xmltail" >> /data/$outdir/"$inname"'.xml'


##REMOVE GFF# HEADERLINES AND CAT FILES TOGETHER
Expand Down

0 comments on commit ce5d9e6

Please sign in to comment.